diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..cb2ae8de --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,16 @@ +build: + image: node:12 + before_script: + - npm ci + script: + - npm run build + artifacts: + paths: + - dist/ +test: + image: node:12 + type: test + before_script: + - npm ci + script: + - npm run test diff --git a/.storybook/main.js b/.storybook/main.js new file mode 100644 index 00000000..ec3f5802 --- /dev/null +++ b/.storybook/main.js @@ -0,0 +1,4 @@ +module.exports = { + stories: ['../src/**/*.stories.ts'], + addons: ['@storybook/addon-actions', '@storybook/addon-links', '@storybook/addon-notes'], +}; diff --git a/.storybook/tsconfig.json b/.storybook/tsconfig.json new file mode 100644 index 00000000..0bcfc758 --- /dev/null +++ b/.storybook/tsconfig.json @@ -0,0 +1,20 @@ +{ + "extends": "../tsconfig.app.json", + "compilerOptions": { + "types": [ + "node" + ] + }, + "exclude": [ + "../src/test.ts", + "../src/**/*.spec.ts", + "../projects/**/*.spec.ts" + ], + "include": [ + "../src/**/*", + "../projects/**/*" + ], + "files": [ + "./typings.d.ts" + ] +} diff --git a/.storybook/typings.d.ts b/.storybook/typings.d.ts new file mode 100644 index 00000000..f73d61b3 --- /dev/null +++ b/.storybook/typings.d.ts @@ -0,0 +1,4 @@ +declare module '*.md' { + const content: string; + export default content; +} diff --git a/angular.json b/angular.json index df9c8dac..8405a6e7 100644 --- a/angular.json +++ b/angular.json @@ -1,133 +1,137 @@ { - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "version": 1, - "newProjectRoot": "projects", - "projects": { - "framadate": { - "projectType": "application", - "schematics": { - "@schematics/angular:component": { - "style": "scss" - } - }, - "root": "", - "sourceRoot": "src", - "prefix": "framadate", - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:browser", - "options": { - "outputPath": "dist/framadate", - "index": "src/index.html", - "main": "src/main.ts", - "polyfills": "src/polyfills.ts", - "tsConfig": "tsconfig.app.json", - "aot": false, - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - "src/styles.scss" - ], - "scripts": [ - "node_modules/marked/lib/marked.js", - "node_modules/prismjs/prism.js", - "node_modules/prismjs/components/prism-css.min.js" - ] - }, - "configurations": { - "production": { - "fileReplacements": [ - { - "replace": "src/environments/environment.ts", - "with": "src/environments/environment.prod.ts" + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "framadate": { + "projectType": "application", + "schematics": { + "@schematics/angular:component": { + "style": "scss" } - ], - "optimization": true, - "outputHashing": "all", - "sourceMap": false, - "extractCss": true, - "namedChunks": false, - "aot": true, - "extractLicenses": true, - "vendorChunk": false, - "buildOptimizer": true, - "budgets": [ - { - "type": "initial", - "maximumWarning": "2mb", - "maximumError": "5mb" + }, + "root": "", + "sourceRoot": "src", + "prefix": "framadate", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "outputPath": "dist/framadate", + "index": "src/index.html", + "main": "src/main.ts", + "polyfills": "src/polyfills.ts", + "tsConfig": "tsconfig.app.json", + "aot": true, + "assets": [ + "src/favicon.ico", + "src/assets" + ], + "styles": [ + "node_modules/primeicons/primeicons.css", + "node_modules/font-awesome/css/font-awesome.css", + "node_modules/primeng/resources/themes/nova-light/theme.css", + "node_modules/primeng/resources/primeng.min.css", + "src/styles.scss" + ], + "scripts": [ + "node_modules/marked/lib/marked.js", + "node_modules/prismjs/prism.js", + "node_modules/prismjs/components/prism-css.min.js" + ] + }, + "configurations": { + "production": { + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + } + ], + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "extractCss": true, + "namedChunks": false, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true, + "budgets": [ + { + "type": "initial", + "maximumWarning": "2mb", + "maximumError": "5mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "6kb", + "maximumError": "10kb" + } + ] + } + } }, - { - "type": "anyComponentStyle", - "maximumWarning": "6kb", - "maximumError": "10kb" + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "options": { + "browserTarget": "framadate:build" + }, + "configurations": { + "production": { + "browserTarget": "framadate:build:production" + } + } + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "browserTarget": "framadate:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "main": "src/test.ts", + "polyfills": "src/polyfills.ts", + "tsConfig": "tsconfig.spec.json", + "karmaConfig": "karma.conf.js", + "assets": [ + "src/favicon.ico", + "src/assets" + ], + "styles": [ + "src/styles.scss" + ], + "scripts": [] + } + }, + "lint": { + "builder": "@angular-devkit/build-angular:tslint", + "options": { + "tsConfig": [ + "tsconfig.app.json", + "tsconfig.spec.json", + "e2e/tsconfig.json" + ], + "exclude": [ + "**/node_modules/**" + ] + } + }, + "e2e": { + "builder": "@angular-devkit/build-angular:protractor", + "options": { + "protractorConfig": "e2e/protractor.conf.js", + "devServerTarget": "framadate:serve" + }, + "configurations": { + "production": { + "devServerTarget": "framadate:serve:production" + } + } } - ] } - } - }, - "serve": { - "builder": "@angular-devkit/build-angular:dev-server", - "options": { - "browserTarget": "framadate:build" - }, - "configurations": { - "production": { - "browserTarget": "framadate:build:production" - } - } - }, - "extract-i18n": { - "builder": "@angular-devkit/build-angular:extract-i18n", - "options": { - "browserTarget": "framadate:build" - } - }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "main": "src/test.ts", - "polyfills": "src/polyfills.ts", - "tsConfig": "tsconfig.spec.json", - "karmaConfig": "karma.conf.js", - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - "src/styles.scss" - ], - "scripts": [] - } - }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": [ - "tsconfig.app.json", - "tsconfig.spec.json", - "e2e/tsconfig.json" - ], - "exclude": [ - "**/node_modules/**" - ] - } - }, - "e2e": { - "builder": "@angular-devkit/build-angular:protractor", - "options": { - "protractorConfig": "e2e/protractor.conf.js", - "devServerTarget": "framadate:serve" - }, - "configurations": { - "production": { - "devServerTarget": "framadate:serve:production" - } - } } - } - }}, - "defaultProject": "framadate" + }, + "defaultProject": "framadate" } diff --git a/documentation/classes/AppPage.html b/documentation/classes/AppPage.html new file mode 100644 index 00000000..6fb7c2db --- /dev/null +++ b/documentation/classes/AppPage.html @@ -0,0 +1,266 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
+
+ + +
+
+ + + + + + + + + + + + + + + +
+
+

+

File

+

+

+ e2e/src/app.po.ts +

+ + + + + +
+

Index

+ + + + + + + + + + + + + + + +
+
Methods
+
+ +
+
+ + + +
+ +

+ Methods +

+ + + + + + + + + + + + + + + + + + + +
+ + + + getTitleText + + + +
+getTitleText() +
+ +
+ +
+ Returns : any + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + navigateTo + + + +
+navigateTo() +
+ +
+ +
+ Returns : any + +
+
+
+ + + + + +
+ + +
+
import { browser, by, element } from 'protractor';
+
+export class AppPage {
+  navigateTo() {
+    return browser.get(browser.baseUrl) as Promise<any>;
+  }
+
+  getTitleText() {
+    return element(by.css('app-root h1')).getText() as Promise<string>;
+  }
+}
+
+
+
+ + + + + + + + +
+
+

result-matching ""

+
    +
    +
    +

    No results matching ""

    +
    +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/MyMissingTranslationHandler.html b/documentation/classes/MyMissingTranslationHandler.html new file mode 100644 index 00000000..46322b13 --- /dev/null +++ b/documentation/classes/MyMissingTranslationHandler.html @@ -0,0 +1,390 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
    +
    + + +
    +
    + + + + + + + + + + + + + + + +
    +
    +

    +

    File

    +

    +

    + src/app/app.module.ts +

    + + + +

    +

    Implements

    +

    +

    + MissingTranslationHandler +

    + + +
    +

    Index

    + + + + + + + + + + + + + + + +
    +
    Methods
    +
    + +
    +
    + + + +
    + +

    + Methods +

    + + + + + + + + + + + + + + + + + + + +
    + + + + handle + + + +
    +handle(params: MissingTranslationHandlerParams) +
    + +
    + +
    + Parameters : + + + + + + + + + + + + + + + + + + +
    NameTypeOptional
    params + MissingTranslationHandlerParams + + No +
    +
    +
    +
    +
    + Returns : string + +
    +
    + +
    +
    +
    + + + + + +
    + + +
    +
    import {BrowserModule} from '@angular/platform-browser';
    +import {NgModule} from '@angular/core';
    +import {AppRoutingModule} from './app-routing.module';
    +import {AppComponent} from './app.component';
    +import {BaseComponent} from './pages/base-page/base.component';
    +import {KindComponent} from './pages/kind/kind.component';
    +import {HeaderComponent} from './header/header.component';
    +import {FormsModule} from '@angular/forms';
    +import {NavigationComponent} from './ui/navigation/navigation.component';
    +import {RouterModule} from '@angular/router';
    +import {Routes} from './config/Routes';
    +import {CommonModule, registerLocaleData} from '@angular/common';
    +import {DatesComponent} from './pages/dates/dates.component';
    +import {DebuggerComponent} from './debugger/debugger.component';
    +import {VisibilityComponent} from './pages/visibility/visibility.component';
    +import {ResumeComponent} from './pages/resume/resume.component';
    +import {PicturesComponent} from './pages/pictures/pictures.component';
    +import {AnswersComponent} from './pages/answers/answers.component';
    +import {EndConfirmationComponent} from './pages/end-confirmation/end-confirmation.component';
    +import {CreateOrRetrieveComponent} from './pages/create-or-retrieve/create-or-retrieve.component';
    +import localeFr from '@angular/common/locales/fr';
    +import localeEn from '@angular/common/locales/en';
    +import {VotingSummaryComponent} from './pages/voting/voting-summary/voting-summary.component';
    +import {VotingGraphComponent} from './pages/voting/voting-graph/voting-graph.component';
    +import {VotingChoiceComponent} from './pages/voting/voting-choice/voting-choice.component';
    +import {PasswordComponent} from './pages/password/password.component';
    +import {HomeComponent} from './pages/home/home.component';
    +import {HttpClient, HttpClientModule} from '@angular/common/http';
    +import {MarkdownModule} from 'ngx-markdown';
    +import {
    +    MissingTranslationHandler,
    +    MissingTranslationHandlerParams,
    +    TranslateLoader,
    +    TranslateModule,
    +    TranslateService
    +} from '@ngx-translate/core';
    +import {TranslateHttpLoader} from '@ngx-translate/http-loader';
    +import {PollGraphicComponent} from './poll-graphic/poll-graphic.component';
    +
    +import {AdminComponent} from './pages/admin/admin.component';
    +import {SelectorComponent} from './ui/selector/selector.component';
    +import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
    +import {ConfigService} from "./services/config.service";
    +import {PollService} from "./services/poll.service";
    +import {ToastModule} from 'primeng/toast';
    +import {ConfirmationService, MessageModule, MessageService} from "primeng";
    +import {PollDisplayComponent} from './pages/poll-display/poll-display.component';
    +import {VotingComponent} from './pages/voting/voting.component';
    +import {VotingCommentComponent} from './pages/voting/voting-comment/voting-comment.component';
    +import {ResettableInputDirective} from './ui/directives/resettable-input.directive';
    +import {ClipboardModule} from "ngx-clipboard";
    +import {ErasableInputComponent} from './ui/erasable-input/erasable-input.component';
    +import {ConfirmDialogModule} from 'primeng/confirmdialog';
    +import {DialogModule} from 'primeng/dialog';
    +import {DateValueAccessorModule} from "./custom-lib/date-value-accessor";
    +import {CopyTextComponent} from './ui/copy-text/copy-text.component';
    +import {CommentsListComponent} from './pages/voting/comments-list/comments-list.component';
    +import {ChoicesListComponent} from './pages/voting/choices-list/choices-list.component';
    +import {VotingNavigationComponent} from './pages/voting/voting-navigation/voting-navigation.component';
    +
    +export class MyMissingTranslationHandler implements MissingTranslationHandler {
    +    handle(params: MissingTranslationHandlerParams) {
    +        return 'some value';
    +    }
    +}
    +
    +registerLocaleData(localeFr, 'fr');
    +registerLocaleData(localeEn, 'en');
    +
    +export function HttpLoaderFactory(http: HttpClient) {
    +    return new TranslateHttpLoader(http);
    +}
    +
    +@NgModule({
    +    declarations: [
    +        AppComponent,
    +        BaseComponent,
    +        KindComponent,
    +        HeaderComponent,
    +        NavigationComponent,
    +        DatesComponent,
    +        DebuggerComponent,
    +        VisibilityComponent,
    +        ResumeComponent,
    +        PicturesComponent,
    +        AnswersComponent,
    +        EndConfirmationComponent,
    +        CreateOrRetrieveComponent,
    +        VotingSummaryComponent,
    +        VotingGraphComponent,
    +        VotingChoiceComponent,
    +        PasswordComponent,
    +        HomeComponent,
    +        PollGraphicComponent,
    +        AdminComponent,
    +        SelectorComponent,
    +        PollDisplayComponent,
    +        VotingComponent,
    +        VotingCommentComponent,
    +        ResettableInputDirective,
    +        ErasableInputComponent,
    +        CopyTextComponent,
    +        CommentsListComponent,
    +        ChoicesListComponent,
    +        VotingNavigationComponent,
    +
    +    ],
    +    imports: [
    +        ConfirmDialogModule,
    +        ClipboardModule,
    +        CommonModule,
    +        BrowserModule,
    +        DialogModule,
    +        DateValueAccessorModule,
    +        BrowserAnimationsModule,
    +        AppRoutingModule,
    +        ToastModule,
    +        MessageModule,
    +        MarkdownModule.forRoot(),
    +        TranslateModule.forRoot({
    +            missingTranslationHandler: {
    +                provide: MissingTranslationHandler,
    +                useClass: MyMissingTranslationHandler,
    +            },
    +            // useDefaultLang: false,
    +            loader: {
    +                provide: TranslateLoader,
    +                useFactory: HttpLoaderFactory,
    +                deps: [HttpClient]
    +            }
    +        }),
    +        HttpClientModule,
    +        FormsModule,
    +        RouterModule.forRoot(Routes, {useHash: true})
    +    ],
    +    providers: [TranslateService, ConfigService, PollService, MessageService, ConfirmationService],
    +    bootstrap: [AppComponent]
    +})
    +export class AppModule {
    +}
    +
    +
    +
    + + + + + + + + +
    +
    +

    result-matching ""

    +
      +
      +
      +

      No results matching ""

      +
      +
      +
      + +
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/PollConfig.html b/documentation/classes/PollConfig.html new file mode 100644 index 00000000..57da7345 --- /dev/null +++ b/documentation/classes/PollConfig.html @@ -0,0 +1,1604 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
      +
      + + +
      +
      + + + + + + + + + + + + + + + +
      +
      +

      +

      File

      +

      +

      + src/app/config/PollConfig.ts +

      + +

      +

      Description

      +

      +

      +

      configuration of the poll, add new fields at will

      + +

      + + + + +
      +

      Index

      + + + + + + + + + + + + + + + + + + + + + +
      +
      Properties
      +
      + +
      +
      Methods
      +
      + +
      +
      + + +
      + +

      + Properties +

      + + + + + + + + + + + + + + + + + +
      + + + + adminKey + + +
      + Type : string + +
      + Default value : '' +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + allowSeveralHours + + +
      + Type : string + +
      + Default value : 'true' +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + answers + + +
      + Type : PollAnswer[] + +
      + Default value : defaultAnswers +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + canModifyAnswers + + +
      + Type : boolean + +
      + Default value : true +
      + +
      + + + + + + + + + + + + + + +
      + + + + creationDate + + +
      + Default value : new Date() +
      + +
      + + + + + + + + + + + +
      + + + + currentPoll + + +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + customUrl + + +
      + Type : string + +
      + Default value : '' +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + customUrlIsUnique + + +
      + Type : null + +
      + Default value : null +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + dateList + + +
      + Type : any + +
      + Default value : otherDefaultDates +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + deletionDateAfterLastModification + + +
      + Type : number + +
      + Default value : 180 +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + description + + +
      + Type : string + +
      + Default value : 'ma description' +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + expiracyDateDefaultInDays + + +
      + Type : number + +
      + Default value : 60 +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + expirationDate + + +
      + Type : string + +
      + Default value : '' +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + isAdmin + + +
      + Type : boolean + +
      + Default value : true +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + myComment + + +
      + Type : string + +
      + Default value : 'wouah trop bien framadate!' +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + myEmail + + +
      + Type : string + +
      + Default value : "tktest@tktest.com" +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + myName + + +
      + Type : string + +
      + Default value : 'mon pseudo' +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + myPolls + + +
      + Type : any + +
      + Default value : [] +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + myTempVoteStack + + +
      + Type : number + +
      + Default value : 0 +
      + +
      + + + + + + + + + + + + + + +
      + + + + myVoteStack + + +
      + Type : any + +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + owner_modifier_token + + +
      + Type : string + +
      + Default value : '' +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + password + + +
      + Type : string + +
      + Default value : '' +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + passwordAccess + + +
      + Type : number + +
      + Default value : 0 +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + pollId + + +
      + Type : null + +
      + Default value : null +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + pollSlug + + +
      + Type : null + +
      + Default value : null +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + pollType + + +
      + Type : string + +
      + Default value : 'dates' +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + step + + +
      + Type : number + +
      + Default value : 0 +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + stepMax + + +
      + Type : number + +
      + Default value : 3 +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + timeList + + +
      + Type : DateChoice[] + +
      + Default value : otherDefaultDates +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + title + + +
      + Type : string + +
      + Default value : 'titre' +
      + +
      + + + + + + + + + + + + + + +
      + + + + urlAdmin + + +
      + Default value : environment.baseHref + '/#/admin/d65es45fd45sdf45sd345f312sdf31sgfd345' +
      + +
      + + + + + + + + + + + + + + +
      + + + + urlPublic + + +
      + Default value : environment.baseHref + '/#/poll/id/4' +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + urlSlugPublic + + +
      + Type : null + +
      + Default value : null +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + visibility + + +
      + Type : string + +
      + Default value : 'link_only' +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + voteChoices + + +
      + Type : string + +
      + Default value : 'only_yes' +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + voteStackId + + +
      + Type : null + +
      + Default value : null +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + whoCanChangeAnswers + + +
      + Type : string + +
      + Default value : 'everybody' +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + whoModifiesAnswers + + +
      + Type : string + +
      + Default value : "everybody" +
      + +
      +
      + +
      + +

      + Methods +

      + + + + + + + + + + + + + + + + + + + +
      + + + + resetConfig + + + +
      +resetConfig() +
      + +
      + +
      + Returns : void + +
      +
      +
      + + + + + +
      + + +
      +
      import {environment} from "../../environments/environment";
      +import {DateChoice, defaultAnswers, otherDefaultDates, PollAnswer} from "./defaultConfigs";
      +
      +export interface DateOption {
      +    timeList: any;
      +    literal: string;
      +    date_object?: object;
      +}
      +
      +const baseConfigValues = {
      +    pollType: "classic",
      +    title: "",
      +    description: "",
      +    myName: "",
      +    myEmail: "",
      +};
      +
      +
      +/**
      + * configuration of the poll, add new fields at will
      + */
      +export class PollConfig {
      +    expiracyDateDefaultInDays = 60;
      +    deletionDateAfterLastModification = 180;
      +    step: number = 0; // step in the progress of creating a poll
      +    stepMax: number = 3; // step max in the progress of creating a poll
      +    pollType: string = 'dates';// classic or dates
      +    title: string = 'titre';
      +    description: string = 'ma description';
      +    myName: string = 'mon pseudo';
      +    myComment: string = 'wouah trop bien framadate!';
      +    isAdmin: boolean = true;
      +    myVoteStack: any;
      +    myTempVoteStack = 0;
      +    myEmail: string = "tktest@tktest.com";
      +    myPolls: any = [];// list of retrieved polls from the backend api
      +    // date specific poll, we have the choice to setup different hours (timeList) for all possible dates (dateList), or use the same hours for all dates
      +    allowSeveralHours = 'true';
      +    // access
      +    visibility = 'link_only'; // visible to anyone with the link:
      +    voteChoices = 'only_yes'; // possible answers to a vote choice: only "yes", "yes, maybe, no"
      +    creationDate = new Date();
      +    expirationDate = ''; // expiracy date
      +    voteStackId = null; // id of the vote stack to update
      +    pollId = null; // id of the current poll when created. data given by the backend api
      +    pollSlug = null; // id of the current poll when created. data given by the backend api
      +    currentPoll; // current poll selected with createPoll or getPoll of ConfigService
      +    passwordAccess = 0;
      +    password = '';
      +    customUrl = ''; // custom slug in the url, must be unique
      +    customUrlIsUnique = null; // given by the backend
      +    urlSlugPublic = null;
      +    urlPublic = environment.baseHref + '/#/poll/id/4';
      +    urlAdmin = environment.baseHref + '/#/admin/d65es45fd45sdf45sd345f312sdf31sgfd345';
      +    adminKey = ''; // key to change config of the poll
      +    owner_modifier_token = ''; // key to change a vote stack
      +    canModifyAnswers: boolean = true;// bool for the frontend selector
      +    whoModifiesAnswers = "everybody";// everybody, self, nobody (= just admin)
      +    whoCanChangeAnswers = 'everybody';// everybody, self, nobody (= just admin)
      +    dateList: any = otherDefaultDates; // sets of days as strings, config to set identical time for days in a special days poll
      +    timeList: DateChoice[] = otherDefaultDates; // ranges of time expressed as strings
      +
      +    answers: PollAnswer[] = defaultAnswers;
      +
      +    resetConfig() {
      +        const self = this;
      +        Object.keys(baseConfigValues).forEach((key) => {
      +            self[key] = baseConfigValues[key];
      +        })
      +    }
      +}
      +
      +
      +
      + + + + + + + + +
      +
      +

      result-matching ""

      +
        +
        +
        +

        No results matching ""

        +
        +
        +
        + +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AdminComponent.html b/documentation/components/AdminComponent.html new file mode 100644 index 00000000..d54589e2 --- /dev/null +++ b/documentation/components/AdminComponent.html @@ -0,0 +1,618 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
        +
        + + +
        +
        + + + + + + + + +
        +

        +

        File

        +

        +

        + src/app/pages/admin/admin.component.ts +

        + + + +

        +

        Implements

        +

        +

        + OnInit +

        + + +
        +

        Metadata

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        selectorframadate-admin
        styleUrls./admin.component.scss
        templateUrl./admin.component.html
        +
        + +
        +

        Index

        + + + + + + + + + + + + + + + + + + + + + +
        +
        Properties
        +
        + +
        +
        Methods
        +
        + +
        +
        + +
        +

        Constructor

        + + + + + + + + + + + + + +
        +constructor(config: ConfigService) +
        + +
        +
        + Parameters : + + + + + + + + + + + + + + + + + + +
        NameTypeOptional
        config + ConfigService + + No +
        +
        +
        +
        + + + + + +
        + +

        + Methods +

        + + + + + + + + + + + + + + + + + + + +
        + + + + ngOnInit + + + +
        +ngOnInit() +
        + +
        + +
        + Returns : void + +
        +
        +
        +
        + +

        + Properties +

        + + + + + + + + + + + + + + +
        + + + + Public + config + + +
        + Type : ConfigService + +
        + +
        +
        + +
        + + +
        +
        import {Component, OnInit} from '@angular/core';
        +import {ConfigService} from '../../services/config.service';
        +
        +@Component({
        +    selector: 'framadate-admin',
        +    templateUrl: './admin.component.html',
        +    styleUrls: ['./admin.component.scss']
        +})
        +export class AdminComponent implements OnInit {
        +
        +    constructor(public config: ConfigService) {
        +    }
        +
        +    ngOnInit() {
        +    }
        +
        +}
        +
        +
        + +
        +
        <form>
        +    <h1>Nom du sondage</h1>
        +
        +    <!--Infos-->
        +    <h2>{{"admin.info_section_title"|translate}}</h2>
        +
        +    <label for="title">
        +        {{"admin.choose_title"|translate}}
        +    </label>
        +    <input type="text" name="title">
        +
        +    <label for="desc">
        +        {{"admin.description"|translate}}
        +    </label>
        +    <textarea name="desc"> </textarea>
        +
        +    <label for="name">
        +        {{"creation.name"|translate}}
        +    </label>
        +    <input type="text" name="name">
        +
        +    <!--Params-->
        +    <h2>{{"admin.settings_section_title"|translate}}</h2>
        +    <h3>{{"visibility.title"|translate}}</h3>
        +
        +    <section class="row">
        +        <label for="answer-visible">
        +            {{"visibility.visibility_want"|translate}}
        +        </label>
        +        <select name="answer-visible">
        +            <option value="all" selected>
        +                {{"visibility.visibility_link"|translate}}
        +            </option>
        +            <option value="per">
        +                {{"visibility.visibility_nobody"|translate}}
        +            </option>
        +        </select>
        +        <label for="answer-visible">
        +            {{"visibility.visibility_see"|translate}}
        +        </label>
        +    </section>
        +
        +    <h3>{{"visibility.votes"|translate}}</h3>
        +    <section>
        +        <label for="vote-date">
        +            {{"visibility.archiving"|translate}}
        +        </label>
        +        <input type="date" name="vote-date">
        +    </section>
        +    <section>
        +        <label for="alter-vote">
        +            {{"visibility.archiving_start"|translate}}
        +        </label>
        +        <select name="alter-vote">
        +            <option value="yes" selected>
        +                {{"visibility.archiving_can"|translate}}
        +            </option>
        +            <option value="no">
        +                {{"visibility.archiving_can_not"|translate}}
        +            </option>
        +        </select>
        +        <label for="type-vote">
        +            {{"visibility.archiving_end"|translate}}
        +        </label>
        +        <select name="type-vote">
        +            <option value="solo" selected>
        +                {{"visibility.modfiy_their"|translate}}
        +            </option>
        +            <option value="all">
        +                {{"visibility.modfiy_everyone"|translate}}
        +            </option>
        +        </select>
        +    </section>
        +
        +    <label for="del-vote">
        +        {{"admin.votes_deletion_desc"|translate}}
        +    </label>
        +    <button class="btn btn--alert btn--outline"
        +            (click)="config.deleteVotes()"
        +    >
        +        <i class="fa fa-trash"></i>
        +        {{'admin.votes_deletion_btn'|translate}}
        +        <i class="fa fa-object-group"></i></button>
        +
        +    <h3>{{"admin.comments_deletion_title"|translate}}</h3>
        +    <label for="del-com">
        +        {{"admin.comments_deletion_desc"|translate}}
        +    </label>
        +
        +    <button class="btn btn--alert btn--outline"
        +            (click)="config.deleteComments()"
        +    >
        +        <i class="fa fa-trash"></i>
        +
        +        {{'admin.comments_deletion_btn'|translate}}
        +        <i class="fa fa-comments-o"></i></button>
        +
        +    <h3>{{"admin.archiving_title"|translate}}</h3>
        +    <section class="row">
        +        <label for="arch">
        +            {{"admin.archiving_desc"|translate}}
        +        </label>
        +        <input type="date" name="arch">
        +    </section>
        +
        +    <h3>{{"visibility.access"|translate}}</h3>
        +    <section class="row">
        +        <label for="password">Je</label>
        +        <select name="password">
        +            <option value="yes" selected>
        +                {{"visibility.access_want_yes"|translate}}
        +            </option>
        +            <option value="no">
        +                {{"visibility.access_want_no"|translate}}
        +            </option>
        +        </select>
        +        <label for="alter-vote">
        +            {{"visibility.access_protect"|translate}}
        +        </label>
        +    </section>
        +
        +    <h3>{{"admin.deletion"|translate}}</h3>
        +    <label for="del"> {{"admin.deletion_desc"|translate}} </label>
        +    <input class="btn btn--alert" type="submit"
        +           name="del" value="{{'admin.deletion_btn'|translate}}">
        +
        +    <!-- Access link -->
        +    <h2>{{"admin.link"|translate}}</h2>
        +    <h3>{{"admin.link_admin"|translate}}</h3>
        +
        +    <label for="copy-link-admin">
        +        {{"admin.link_admin_desc"|translate}}
        +        https://framadate.org/urladmindusondage
        +    </label>
        +    <input class="btn btn--mini" type="submit" name="copy-link-admin"
        +           value="{{'admin.copy_link'|translate}}">
        +    <a href="#" class="next">{{"admin.link_admin_btn"|translate}}</a>
        +
        +    <h3>{{"admin.polled_people"|translate}}</h3>
        +    <label for="copy-link">
        +        {{"admin.polled_people_desc"|translate}}
        +        {{config.urlPublic}}</label>
        +    <input class="btn btn--mini" type="submit" name="copy-link"
        +           value="{{'admin.copy_link'|translate}}">
        +    <a href="#" class="next">{{"admin.polled_people_btn"|translate}}</a>
        +
        +    <h3>{{"admin.email_links"|translate}}</h3>
        +    <label for="mail">{{"admin.email_links_desc"|translate}}</label>
        +    <input type="email" name="mail">
        +    <input class="btn btn--mini" type="submit" name="send-mail"
        +           value="{{'admin.email_links_btn'|translate}}">
        +
        +</form>
        +<p-confirmDialog header="Confirmation" icon="pi pi-exclamation-triangle"></p-confirmDialog>
        +
        +
        + +
        +

        + ./admin.component.scss +

        +
        form{
        +  display:flex;
        +  flex-direction: column;
        +  width:340px;
        +margin:auto;
        +}
        +.row{
        +  flex-direction: row;
        +  flex-wrap: wrap;
        +  padding-bottom: 65px;
        +}
        +textarea{
        +  height:115px;
        +  margin-bottom: 50px;
        +}
        +label{
        +  padding-bottom: 10px;
        +  flex-wrap: wrap;
        +}
        +h2,h1{
        +  margin-bottom: 40px;
        +}
        +h2{
        +  margin-top: 40px;
        +  padding-left:16px;
        +}
        +.btn--alert{
        +  font-weight: 600;
        +}
        +h3{
        +  padding-left: 28px;
        +  padding-bottom:15px;
        +}
        +select,input[type=date]{
        +  max-width: 130px;
        +}
        +.btn--outline{
        +  margin-bottom: 70px;
        +}
        +
        +
        + +
        +
        +
        +
        + Legend +
        +
        +
        Html element +
        +
        +
        Component +
        +
        +
        Html element with directive +
        +
        +
        + + +
        + + + + + + + + + + + + + + + + + + + + + +
        +
        +

        result-matching ""

        +
          +
          +
          +

          No results matching ""

          +
          +
          +
          + +
          +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AnswersComponent.html b/documentation/components/AnswersComponent.html new file mode 100644 index 00000000..61ba0833 --- /dev/null +++ b/documentation/components/AnswersComponent.html @@ -0,0 +1,1428 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
          +
          + + +
          +
          + + + + + + + + +
          +

          +

          File

          +

          +

          + src/app/pages/answers/answers.component.ts +

          + + +

          +

          Extends

          +

          +

          + BaseComponent +

          + +

          +

          Implements

          +

          +

          + OnInit + AfterViewInit + OnChanges +

          + + +
          +

          Metadata

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          selectorframadate-answers
          styleUrls./answers.component.scss
          templateUrl./answers.component.html
          +
          + +
          +

          Index

          + + + + + + + + + + + + + + + + + + + + + +
          +
          Properties
          +
          + +
          +
          Methods
          +
          + +
          +
          + +
          +

          Constructor

          + + + + + + + + + + + + + +
          +constructor(config: ConfigService, document: any, cd: ChangeDetectorRef) +
          + +
          +
          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          NameTypeOptional
          config + ConfigService + + No +
          document + any + + No +
          cd + ChangeDetectorRef + + No +
          +
          +
          +
          + + + + + +
          + +

          + Methods +

          + + + + + + + + + + + + + + + + + + + +
          + + + + addAnswer + + + +
          +addAnswer() +
          + +
          + +
          + Returns : void + +
          +
          + + + + + + + + + + + + + + + + + + + +
          + + + + checkValidAnswers + + + +
          +checkValidAnswers() +
          + +
          + +
          + Returns : void + +
          +
          + + + + + + + + + + + + + + + + + + + +
          + + + + focusOnAnswer + + + +
          +focusOnAnswer(i) +
          + +
          + +
          + Parameters : + + + + + + + + + + + + + + + + +
          NameOptional
          i + No +
          +
          +
          +
          +
          + Returns : void + +
          +
          + +
          +
          + + + + + + + + + + + + + + + + + + + +
          + + + + navigateOrDelete + + + +
          +navigateOrDelete(event: KeyboardEvent, i) +
          + +
          + +
          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
          NameTypeOptional
          event + KeyboardEvent + + No +
          i + + No +
          +
          +
          +
          +
          + Returns : void + +
          +
          + +
          +
          + + + + + + + + + + + + + + + + + + + +
          + + + + ngAfterViewInit + + + +
          +ngAfterViewInit() +
          + +
          + +
          + Returns : void + +
          +
          + + + + + + + + + + + + + + + + + + + +
          + + + + ngOnChanges + + + +
          +ngOnChanges() +
          + +
          + +
          + Returns : void + +
          +
          + + + + + + + + + + + + + + + + + + + +
          + + + + ngOnInit + + + +
          +ngOnInit() +
          + +
          + +
          + Returns : void + +
          +
          + + + + + + + + + + + + + + + + + + + +
          + + + + showModalForPictureOfAnswer + + + +
          +showModalForPictureOfAnswer(answer) +
          + +
          + +
          + Parameters : + + + + + + + + + + + + + + + + +
          NameOptional
          answer + No +
          +
          +
          +
          +
          + Returns : void + +
          +
          + +
          +
          + + + + + + + + + + + + + + + + + + + +
          + + + + trackFunction + + + +
          +trackFunction(index: number, item: any) +
          + +
          + +
          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
          NameTypeOptional
          index + number + + No +
          item + any + + No +
          +
          +
          +
          +
          + Returns : number + +
          +
          + +
          +
          + + + + + + + + + + + + + + + + + + + + + + +
          + + + + checkValidity + + + +
          +checkValidity() +
          +
          Inherited from BaseComponent +
          +
          +
          Defined in BaseComponent:21 +
          +
          + +
          + Returns : boolean + +
          +
          + + + + + + + + + + + + + + + + + + + + + + +
          + + + + displayErrorMessage + + + +
          +displayErrorMessage() +
          +
          Inherited from BaseComponent +
          +
          +
          Defined in BaseComponent:27 +
          +
          + +
          + Returns : boolean + +
          +
          + + + + + + + + + + + + + + + + + + + + + + +
          + + + + ngOnInit + + + +
          +ngOnInit() +
          +
          Inherited from BaseComponent +
          +
          +
          Defined in BaseComponent:17 +
          +
          + +
          + Returns : void + +
          +
          +
          +
          + +

          + Properties +

          + + + + + + + + + + + + + + +
          + + + + allAnswersAreValid + + +
          + Default value : false +
          + +
          + + + + + + + + + + + + + + + + + +
          + + + + answerList + + +
          + Type : [] + +
          + Default value : [] +
          + +
          + + + + + + + + + + + + + + +
          + + + + Public + config + + +
          + Type : ConfigService + +
          + +
          + + + + + + + + + + + + + + + + + +
          + + + + currentHeader + + +
          + Type : any + +
          + Default value : "" +
          + +
          + + + + + + + + + + + + + + +
          + + + + display + + +
          + Type : boolean + +
          + +
          + + + + + + + + + + + + + + + + + +
          + + + + Public + config + + +
          + Type : ConfigService + +
          +
          Inherited from BaseComponent +
          +
          +
          Defined in BaseComponent:14 +
          +
          +
          + +
          + + +
          +
          import {AfterViewInit, ChangeDetectorRef, Component, Inject, OnChanges, OnInit} from '@angular/core';
          +import {BaseComponent} from '../base-page/base.component';
          +import {ConfigService} from '../../services/config.service';
          +
          +import {DOCUMENT} from '@angular/common';
          +
          +@Component({
          +    selector: 'framadate-answers',
          +    templateUrl: './answers.component.html',
          +    styleUrls: ['./answers.component.scss']
          +})
          +export class AnswersComponent extends BaseComponent implements OnInit, AfterViewInit, OnChanges {
          +
          +    allAnswersAreValid = false;
          +
          +    answerList = [];
          +    currentHeader: any = "";
          +    display: boolean;
          +
          +    constructor(public config: ConfigService,
          +                @Inject(DOCUMENT) private document: any,
          +                private cd: ChangeDetectorRef) {
          +        super(config);
          +        this.answerList = this.config.answers;
          +    }
          +
          +    // todo, manage validation of each page in a common way
          +    ngOnInit() {
          +    }
          +
          +    ngOnChanges() {
          +
          +        this.checkValidAnswers();
          +    }
          +
          +    checkValidAnswers() {
          +        this.allAnswersAreValid = true;
          +        this.config.answers.forEach(answer => {
          +            if (!answer.text.length) {
          +                this.allAnswersAreValid = false;
          +                return;
          +            }
          +        });
          +    }
          +
          +    ngAfterViewInit() {
          +        this.focusOnAnswer(0);
          +        this.checkValidAnswers();
          +    }
          +
          +    trackFunction(index: number, item: any): number {
          +        return item.id;
          +    }
          +
          +    addAnswer() {
          +        this.config.answers.push(
          +            {
          +                id: this.config.answers.length + 1,
          +                text: '',
          +                url: '',
          +                file: '',
          +                literal: '',
          +                date_object: null,
          +                timeList: []
          +            });
          +        this.cd.detectChanges(); // to refresh the view before focusing on the new input
          +        this.focusOnAnswer(this.config.answers.length - 1)
          +    }
          +
          +    focusOnAnswer(i) {
          +        const AnswersDomToFocus = this.document.querySelectorAll('.answers .answer');
          +        const dom = AnswersDomToFocus[i];
          +        if (dom.focus) {
          +            dom.focus();
          +        }
          +        if (dom.select) {
          +            dom.select();
          +        }
          +    }
          +
          +    navigateOrDelete(event: KeyboardEvent, i) {
          +        if (event.ctrlKey && event.key == "d") {
          +            this.config.answers.splice(i, 1)
          +        }
          +        if (event.key == "ArrowUp" && i > 0) {
          +            this.focusOnAnswer(i - 1);
          +        }
          +        if (event.key == "ArrowDown" && i < this.config.answers.length) {
          +            this.focusOnAnswer(i + 1);
          +        }
          +    }
          +
          +    showModalForPictureOfAnswer(answer) {
          +        // TODO
          +        this.currentHeader = answer;
          +        this.display = true;
          +        // this.config.todo();
          +    }
          +}
          +
          +
          + +
          +
          <div class="answers" >
          +    <h1 i18n >
          +        Choisir les propositions
          +    </h1 >
          +
          +    <p
          +        class="subtitle"
          +        i18n >
          +        Vous pouvez utiliser la syntaxe markdown, et naviguer entre les inputs avec les flèches du clavier.
          +    </p >
          +
          +    <ol >
          +        <li
          +            #answers
          +            *ngFor="let answer of config.answers; index as i;trackBy trackFunction"
          +            class="answer-item" >
          +            <button
          +                class='btn btn--default'
          +                title='ajouter une image'
          +                (click)='showModalForPictureOfAnswer(answer)' >
          +                <i class='fa fa-image' ></i >
          +            </button >
          +            <label
          +                for='answer_{{answer.id}}_url'
          +                (click)='showModalForPictureOfAnswer(answer)' >
          +
          +                <img
          +                    class='img-thumbnail'
          +                    src='{{answer.url}}'
          +                    alt='image {{answer.url}}' >
          +            </label >
          +            <p-dialog
          +                class='url-dialog'
          +                [(visible)]="display"
          +                [modal]='true' >
          +                <p-header >
          +                    {{answer.text}}
          +                </p-header >
          +
          +                <form
          +                    action='#'
          +                    (submit)='display=false' >
          +                    <label for='answer_{{answer.id}}_url' >
          +                        Choisissez une URL pour illustrer le choix de réponse
          +                    </label >
          +                    <i class='fa fa-image' ></i >
          +                    <br >
          +                    <input
          +                        class='input is-block'
          +                        id='answer_{{answer.id}}_url'
          +                        type='text'
          +                        autofocus='autofocus'
          +                        name='answer-url'
          +                        [(ngModel)]='answer.url' >
          +
          +                </form >
          +
          +            </p-dialog >
          +            <input
          +                type="name"
          +                class="answer"
          +                id='answer_{{answer.id}}'
          +                [(ngModel)]="answer.text"
          +                (keyup.enter)="addAnswer()"
          +                (keyup)="navigateOrDelete($event,i)"
          +                required='required'
          +                placeholder="réponse"
          +            >
          +            <button
          +                class="btn btn--alert"
          +                (click)="config.answers.splice(i,1)" >X
          +            </button >
          +        </li >
          +    </ol >
          +
          +    <button
          +        class="btn btn--primary btn--outline"
          +        (click)="addAnswer()"
          +        [ngClass]="{'btn--primary': allAnswersAreValid}"
          +        i18n
          +    >
          +        <i class='fa fa-plus' ></i >
          +        Ajouter une proposition
          +    </button >
          +    <br >
          +    <button
          +        [routerLink]="'/step/resume'"
          +        class="btn btn--full "
          +        i18n
          +        [ngClass]="{'btn--primary': allAnswersAreValid}"
          +        [disabled]='!allAnswersAreValid'
          +    >
          +        Voyons ce que ça donne
          +    </button >
          +    <br >
          +    <a
          +        [routerLink]="'/home'"
          +        class="prev"
          +        i18n >
          +        Retour
          +    </a >
          +</div >
          +
          +
          + +
          +

          + ./answers.component.scss +

          +
          +
          + +
          +
          +
          +
          + Legend +
          +
          +
          Html element +
          +
          +
          Component +
          +
          +
          Html element with directive +
          +
          +
          + + +
          + + + + + + + + + + + + + + + + + + + + + +
          +
          +

          result-matching ""

          +
            +
            +
            +

            No results matching ""

            +
            +
            +
            + +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AppComponent.html b/documentation/components/AppComponent.html new file mode 100644 index 00000000..bab205bc --- /dev/null +++ b/documentation/components/AppComponent.html @@ -0,0 +1,1088 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
            +
            + + +
            +
            + + + + + + + + +
            +

            +

            File

            +

            +

            + src/app/app.component.ts +

            + + + + + +
            +

            Metadata

            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            selectorapp-root
            styleUrls./app.component.scss
            templateUrl./app.component.html
            +
            + +
            +

            Index

            + + + + + + + + + + + + + + + + + + + + + +
            +
            Properties
            +
            + +
            +
            Methods
            +
            + +
            +
            + +
            +

            Constructor

            + + + + + + + + + + + + + +
            +constructor(translate: TranslateService, config: ConfigService, document, route: Router) +
            + +
            +
            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            NameTypeOptional
            translate + TranslateService + + No +
            config + ConfigService + + No +
            document + + No +
            route + Router + + No +
            +
            +
            +
            + + + + + +
            + +

            + Methods +

            + + + + + + + + + + + + + + + + + + + +
            + + + + changeLanguage + + + +
            +changeLanguage() +
            + +
            +

            set the next lang or loop to the first +this is to manage future languages available

            +
            + +
            + Returns : void + +
            +
            + + + + + + + + + + + + + + + + + + + +
            + + + + detectCurrentTabOnRouteChange + + + +
            +detectCurrentTabOnRouteChange() +
            + +
            + +
            + Returns : void + +
            +
            + + + + + + + + + + + + + + + + + + + +
            + + + + scrollGoToTop + + + +
            +scrollGoToTop() +
            + +
            + +
            + Returns : void + +
            +
            + + + + + + + + + + + + + + + + + + + +
            + + + + switchLanguage + + + +
            +switchLanguage(language: string) +
            + +
            + +
            + Parameters : + + + + + + + + + + + + + + + + + + +
            NameTypeOptional
            language + string + + No +
            +
            +
            +
            +
            + Returns : void + +
            +
            + +
            +
            + + + + + + + + + + + + + + + + + + + +
            + + + + toggleMenu + + + +
            +toggleMenu() +
            + +
            + +
            + Returns : void + +
            +
            + + + + + + + + + + + + + + + + + + + +
            + + + + updateCurrentTab + + + +
            +updateCurrentTab(event) +
            + +
            + +
            + Parameters : + + + + + + + + + + + + + + + + +
            NameOptional
            event + No +
            +
            +
            +
            +
            + Returns : void + +
            +
            + +
            +
            +
            +
            + +

            + Properties +

            + + + + + + + + + + + + + + + + + +
            + + + + currentLang + + +
            + Type : string + +
            + Default value : 'fr' +
            + +
            + + + + + + + + + + + + + + + + + +
            + + + + langsAvailable + + +
            + Type : [] + +
            + Default value : ['fr', 'en'] +
            + +
            + + + + + + + + + + + + + + + + + +
            + + + + menuVisible + + +
            + Type : boolean + +
            + Default value : true +
            + +
            + + + + + + + + + + + + + + + + + +
            + + + + minutes + + +
            + Type : number + +
            + Default value : 12 +
            + +
            + + + + + + + + + + + + + + +
            + + + + step + + +
            + Type : string + +
            + +
            + + + + + + + + + + + + + + + + + +
            + + + + title + + +
            + Type : string + +
            + Default value : 'framadate' +
            + +
            + + + + + + + + + + + + + + + + + +
            + + + + user + + +
            + Type : object + +
            + Default value : { + name: 'Arthur', + age: 42 + } +
            + +
            +
            + +
            + + +
            +
            import {Component, Inject} from '@angular/core';
            +import {TranslateService} from '@ngx-translate/core';
            +import {NavigationStart, Router} from '@angular/router';
            +import {DOCUMENT} from "@angular/common";
            +import {filter} from "rxjs/operators";
            +import {ConfigService} from "./services/config.service";
            +
            +@Component({
            +    selector: 'app-root',
            +    templateUrl: './app.component.html',
            +    styleUrls: ['./app.component.scss']
            +})
            +export class AppComponent {
            +    currentLang = 'fr';
            +    langsAvailable = ['fr', 'en'];
            +    title = 'framadate';
            +    //translation demo:
            +    minutes = 12;
            +    user = {
            +        name: 'Arthur',
            +        age: 42
            +    };
            +    menuVisible: boolean = true;
            +    step: string;
            +
            +    constructor(private translate: TranslateService,
            +                private config : ConfigService,
            +                @Inject(DOCUMENT) private document,
            +                private route: Router) {
            +        this.translate.setDefaultLang(this.currentLang);
            +        this.detectCurrentTabOnRouteChange();
            +
            +    }
            +
            +    detectCurrentTabOnRouteChange() {
            +        this.route.events.subscribe((event: any) => {
            +
            +
            +        });
            +        this.route.events.pipe(filter(event => event instanceof NavigationStart)).subscribe((event:NavigationStart) => {
            +            this.scrollGoToTop();
            +            this.updateCurrentTab(event);
            +            // only if there is a poll ID
            +            this.config.fetchPollFromRoute(event);
            +        })
            +
            +    }
            +
            +    switchLanguage(language: string) {
            +        this.translate.use(language);
            +        this.currentLang = language;
            +    }
            +
            +    /**
            +     * set the next lang or loop to the first
            +     * this is to manage future languages available
            +     */
            +    changeLanguage() {
            +        let langs = this.langsAvailable;
            +        let indexofCurrent = langs.indexOf(this.currentLang);
            +        if (indexofCurrent > -1) {
            +            let newIndex = indexofCurrent + 1;
            +            if (newIndex > (langs.length - 1)) {
            +                newIndex = 0;
            +            }
            +            this.currentLang = this.langsAvailable[newIndex];
            +        }
            +        this.translate.use(this.currentLang);
            +    }
            +
            +    toggleMenu() {
            +        this.menuVisible = !this.menuVisible;
            +    }
            +
            +    scrollGoToTop() {
            +        this.document.documentElement.scrollTop = 0;
            +    }
            +
            +    updateCurrentTab(event){
            +        if (event.url) {
            +            const tab = event.url.split('/');
            +            if (tab && tab[2]) {
            +                this.step = tab[2];
            +            } else {
            +                this.step = 'home';
            +            }
            +        }
            +    }
            +}
            +
            +
            + +
            +
            <header style="text-align:center" >
            +    <a
            +        [routerLink]="'home'"
            +        class="home_link"
            +        aria-roledescription="home"
            +    >
            +        <h1 >
            +            <span class="logo_first" >Frama</span >
            +            <span class="logo_second" >date</span > (démo)
            +        </h1 >
            +        <div class="legend" >proposé par
            +            <span class="legend_first" >Frama</span >
            +            <span class="legend_second" >soft</span >
            +        </div >
            +    </a >
            +    <div id="translate_example" >
            +        <div class="wrapper" >
            +            <img
            +                src="assets/img/icone-langue.svg"
            +                alt="location icon"
            +                (click)="changeLanguage()"
            +                class="lang_icon clickable"
            +            >
            +            <img
            +                (click)="toggleMenu()"
            +                alt="menu icon"
            +                class="menu_icon  clickable"
            +                src="assets/img/icone-menu.svg"
            +            >
            +            <select
            +                name="language"
            +                class="language-selector"
            +                (change)="switchLanguage(currentLang)"
            +                [(ngModel)]="currentLang"
            +            >
            +                <option
            +                    value="d"
            +                    default
            +                    class="select_language"
            +                >{{"Language" | translate}}</option >
            +                <option value="en" >English</option >
            +                <option value="fr" >Français</option >
            +            </select >
            +            <span
            +                (click)="toggleMenu()"
            +                class="menu_label" >Menu</span >
            +        </div >
            +
            +    </div >
            +
            +</header >
            +
            +<main >
            +    <router-outlet ></router-outlet >
            +</main >
            +<framadate-debugger ></framadate-debugger >
            +<framadate-navigation
            +    *ngIf="menuVisible"
            +    [step]="step" ></framadate-navigation >
            +<p-toast position="top-right" ></p-toast >
            +
            +
            +
            + +
            +

            + ./app.component.scss +

            +
            @charset "UTF-8";
            +
            +header {
            +    h1,
            +    a {
            +        &::before,
            +        &::after {
            +            display: none;
            +        }
            +    }
            +}
            +
            +i {
            +    display: block;
            +}
            +
            +.language-selector {
            +    width: auto;
            +}
            +
            +
            + +
            +
            +
            +
            + Legend +
            +
            +
            Html element +
            +
            +
            Component +
            +
            +
            Html element with directive +
            +
            +
            + + +
            + + + + + + + + + + + + + + + + + + + + + +
            +
            +

            result-matching ""

            +
              +
              +
              +

              No results matching ""

              +
              +
              +
              + +
              +
              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/BaseComponent.html b/documentation/components/BaseComponent.html new file mode 100644 index 00000000..2b3dc013 --- /dev/null +++ b/documentation/components/BaseComponent.html @@ -0,0 +1,528 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
              +
              + + +
              +
              + + + + + + + + +
              +

              +

              File

              +

              +

              + src/app/pages/base-page/base.component.ts +

              + + + +

              +

              Implements

              +

              +

              + OnInit +

              + + +
              +

              Metadata

              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
              selectorframadate-base-page
              styleUrls./base.component.scss
              templateUrl./base.component.html
              +
              + +
              +

              Index

              + + + + + + + + + + + + + + + + + + + + + +
              +
              Properties
              +
              + +
              +
              Methods
              +
              + +
              +
              + +
              +

              Constructor

              + + + + + + + + + + + + + +
              +constructor(config: ConfigService) +
              + +
              +
              + Parameters : + + + + + + + + + + + + + + + + + + +
              NameTypeOptional
              config + ConfigService + + No +
              +
              +
              +
              + + + + + +
              + +

              + Methods +

              + + + + + + + + + + + + + + + + + + + +
              + + + + checkValidity + + + +
              +checkValidity() +
              + +
              + +
              + Returns : boolean + +
              +
              + + + + + + + + + + + + + + + + + + + +
              + + + + displayErrorMessage + + + +
              +displayErrorMessage() +
              + +
              + +
              + Returns : boolean + +
              +
              + + + + + + + + + + + + + + + + + + + +
              + + + + ngOnInit + + + +
              +ngOnInit() +
              + +
              + +
              + Returns : void + +
              +
              +
              +
              + +

              + Properties +

              + + + + + + + + + + + + + + +
              + + + + Public + config + + +
              + Type : ConfigService + +
              + +
              +
              + +
              + + +
              +
              import {Component, OnInit} from '@angular/core';
              +import {ConfigService} from '../../services/config.service';
              +
              +@Component({
              +    selector: 'framadate-base-page',
              +    templateUrl: './base.component.html',
              +    styleUrls: ['./base.component.scss']
              +})
              +/**
              + * base page is aware of the state of the filling
              + */
              +export class BaseComponent implements OnInit {
              +
              +    constructor(public config: ConfigService) {
              +    }
              +
              +    ngOnInit() {
              +    }
              +
              +
              +    checkValidity() {
              +        // TODO with form controls
              +        this.config.todo();
              +        return true;
              +    }
              +
              +    displayErrorMessage() {
              +        // TODO
              +        this.config.todo();
              +        return true;
              +    }
              +}
              +
              +
              + +
              +
              <h1>Ce composant est celui de base pour les pages</h1>
              +<a [routerLink]="'/step/end'" class="btn btn-block" i18n="@@confirm">
              +	{{"config.perfect"|translate}}
              +</a>
              +
              +
              + +
              +

              + ./base.component.scss +

              +
              +
              + +
              +
              +
              +
              + Legend +
              +
              +
              Html element +
              +
              +
              Component +
              +
              +
              Html element with directive +
              +
              +
              + + +
              + + + + + + + + + + + + + + + + + + + + + +
              +
              +

              result-matching ""

              +
                +
                +
                +

                No results matching ""

                +
                +
                +
                + +
                +
                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ChoicesListComponent.html b/documentation/components/ChoicesListComponent.html new file mode 100644 index 00000000..a7dcf299 --- /dev/null +++ b/documentation/components/ChoicesListComponent.html @@ -0,0 +1,392 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                +
                + + +
                +
                + + + + + + + + +
                +

                +

                File

                +

                +

                + src/app/pages/voting/choices-list/choices-list.component.ts +

                + + + + + +
                +

                Metadata

                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                selectorframadate-choices-list
                styleUrls./choices-list.component.scss
                templateUrl./choices-list.component.html
                +
                + +
                +

                Index

                + + + + + + + + + + + + + + + +
                +
                Properties
                +
                + +
                +
                + +
                +

                Constructor

                + + + + + + + + + + + + + +
                +constructor(config: ConfigService) +
                + +
                +
                + Parameters : + + + + + + + + + + + + + + + + + + +
                NameTypeOptional
                config + ConfigService + + No +
                +
                +
                +
                + + + + + + +
                + +

                + Properties +

                + + + + + + + + + + + + + + +
                + + + + Public + config + + +
                + Type : ConfigService + +
                + +
                +
                + +
                + + +
                +
                import {Component} from '@angular/core';
                +import {ConfigService} from "../../../services/config.service";
                +
                +@Component({
                +    selector: 'framadate-choices-list',
                +    templateUrl: './choices-list.component.html',
                +    styleUrls: ['./choices-list.component.scss']
                +})
                +export class ChoicesListComponent {
                +
                +    constructor(public config: ConfigService) {
                +
                +    }
                +
                +}
                +
                +
                + +
                +
                
                +<div
                +    *ngIf='config.currentPoll'
                +    class="list-of-choices" >
                +    <div *ngFor="let choice of config.currentPoll.choices" >
                +
                +        <framadate-voting-choice
                +            [choice]="choice"
                +            [choices_count]="config.currentPoll.choices_count"
                +            [pollIsSpecialDate]="config.currentPoll.poll.kind == 'date'"
                +            [poll]='config.currentPoll' ></framadate-voting-choice >
                +    </div >
                +</div >
                +<button
                +    class='btn  btn-block submit-votestack'
                +    (click)='config.addVote()'
                +    [disabled]='!config.myTempVoteStack'
                +    [ngClass]='{"btn--primary" : config.myTempVoteStack } '
                +    *ngIf='!config.myVoteStack || !config.myVoteStack.id' >
                +    <i class='fa fa-paper-plane' ></i > Envoyer
                +
                +</button >
                +<button
                +    class='btn btn--primary btn-block submit-votestack update'
                +    (click)='config.updateVote(config.myVoteStack)'
                +    *ngIf='config.myVoteStack && config.myVoteStack.id' >
                +    <i class='fa fa-pencil' ></i > Mettre à jour
                +</button >
                +
                +
                + +
                +

                + ./choices-list.component.scss +

                +
                .submit-votestack {
                +    position: fixed;
                +    bottom: 5px;
                +    right: 5px;
                +}
                +
                +
                + +
                +
                +
                +
                + Legend +
                +
                +
                Html element +
                +
                +
                Component +
                +
                +
                Html element with directive +
                +
                +
                + + +
                + + + + + + + + + + + + + + + + + + + + + +
                +
                +

                result-matching ""

                +
                  +
                  +
                  +

                  No results matching ""

                  +
                  +
                  +
                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/CommentsListComponent.html b/documentation/components/CommentsListComponent.html new file mode 100644 index 00000000..04520888 --- /dev/null +++ b/documentation/components/CommentsListComponent.html @@ -0,0 +1,420 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                  +
                  + + +
                  +
                  + + + + + + + + +
                  +

                  +

                  File

                  +

                  +

                  + src/app/pages/voting/comments-list/comments-list.component.ts +

                  + + + + + +
                  +

                  Metadata

                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  selectorframadate-comments-list
                  styleUrls./comments-list.component.scss
                  templateUrl./comments-list.component.html
                  +
                  + +
                  +

                  Index

                  + + + + + + + + + + + + + + + +
                  +
                  Properties
                  +
                  + +
                  +
                  + +
                  +

                  Constructor

                  + + + + + + + + + + + + + +
                  +constructor(config: ConfigService) +
                  + +
                  +
                  + Parameters : + + + + + + + + + + + + + + + + + + +
                  NameTypeOptional
                  config + ConfigService + + No +
                  +
                  +
                  +
                  + + + + + + +
                  + +

                  + Properties +

                  + + + + + + + + + + + + + + +
                  + + + + Public + config + + +
                  + Type : ConfigService + +
                  + +
                  +
                  + +
                  + + +
                  +
                  import {Component} from '@angular/core';
                  +import {ConfigService} from "../../../services/config.service";
                  +
                  +@Component({
                  +    selector: 'framadate-comments-list',
                  +    templateUrl: './comments-list.component.html',
                  +    styleUrls: ['./comments-list.component.scss']
                  +})
                  +export class CommentsListComponent {
                  +
                  +    constructor(public config: ConfigService) {
                  +
                  +    }
                  +
                  +}
                  +
                  +
                  + +
                  +
                  <section class="name" >
                  +    <label for="name" >
                  +        <i class='fa fa-user' ></i >
                  +        Votre nom :</label >
                  +    <input
                  +        type="text"
                  +        name="name"
                  +        id="name"
                  +        [(ngModel)]="config.myName" >
                  +    <input
                  +        type="text"
                  +        name="name"
                  +        id="email"
                  +        [(ngModel)]="config.myEmail" >
                  +    <i class='fa fa-envelope' ></i >
                  +</section >
                  +<div
                  +    class="comments"
                  +    id='comments' >
                  +    <h2 class="margin-top-x7" >Laisser un commentaire</h2 >
                  +    <label for="crname" >Votre nom :</label >
                  +    <input
                  +        type="text"
                  +        class="margin-btm-x3"
                  +        name="crname"
                  +        [(ngModel)]='config.myName'
                  +        id="crname" >
                  +    <input
                  +        type="text"
                  +        name="cremail"
                  +        id="email_comment"
                  +        [(ngModel)]="config.myEmail" >
                  +    <label for='email_comment' >
                  +        <i class='fa fa-envelope' ></i >
                  +    </label >
                  +    <div >
                  +        <label for="comment" >Votre commentaire :</label >
                  +        <br >
                  +        <textarea
                  +            name="comment"
                  +            id="comment"
                  +            [(ngModel)]='config.myComment'
                  +        >
                  +      </textarea >
                  +    </div >
                  +    <input
                  +        type="submit"
                  +        name="add-comment"
                  +        class="btn btn--primary btn--outline"
                  +        value="Ajouter mon commentaire"
                  +        (click)='config.addComment()' >
                  +    <div
                  +        class='comments-part'
                  +        *ngIf='config.currentPoll' >
                  +
                  +        <framadate-voting-comment
                  +            [comment]="c"
                  +            *ngFor="let c of config.currentPoll.comments " >
                  +        </framadate-voting-comment >
                  +    </div >
                  +</div >
                  +
                  +
                  + +
                  +

                  + ./comments-list.component.scss +

                  +
                  +
                  + +
                  +
                  +
                  +
                  + Legend +
                  +
                  +
                  Html element +
                  +
                  +
                  Component +
                  +
                  +
                  Html element with directive +
                  +
                  +
                  + + +
                  + + + + + + + + + + + + + + + + + + + + + +
                  +
                  +

                  result-matching ""

                  +
                    +
                    +
                    +

                    No results matching ""

                    +
                    +
                    +
                    + +
                    +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/CopyTextComponent.html b/documentation/components/CopyTextComponent.html new file mode 100644 index 00000000..37cef1c6 --- /dev/null +++ b/documentation/components/CopyTextComponent.html @@ -0,0 +1,473 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                    +
                    + + +
                    +
                    + + + + + + + + +
                    +

                    +

                    File

                    +

                    +

                    + src/app/ui/copy-text/copy-text.component.ts +

                    + + + +

                    +

                    Implements

                    +

                    +

                    + OnInit +

                    + + +
                    +

                    Metadata

                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    selectorframadate-copy-text
                    styleUrls./copy-text.component.scss
                    templateUrl./copy-text.component.html
                    +
                    + +
                    +

                    Index

                    + + + + + + + + + + + + + + + + + + + + + +
                    +
                    Methods
                    +
                    + +
                    +
                    Inputs
                    +
                    + +
                    +
                    + +
                    +

                    Constructor

                    + + + + + + + + + + + + + +
                    +constructor(messageService: MessageService) +
                    + +
                    +
                    + Parameters : + + + + + + + + + + + + + + + + + + +
                    NameTypeOptional
                    messageService + MessageService + + No +
                    +
                    +
                    +
                    + +
                    +

                    Inputs

                    + + + + + + + + + + + + +
                    + + textToCopy +
                    + Type : any + +
                    + +
                    +
                    + + + +
                    + +

                    + Methods +

                    + + + + + + + + + + + + + + + + + + + +
                    + + + + handleClick + + + +
                    +handleClick() +
                    + +
                    + +
                    + Returns : void + +
                    +
                    + + + + + + + + + + + + + + + + + + + +
                    + + + + ngOnInit + + + +
                    +ngOnInit() +
                    + +
                    + +
                    + Returns : void + +
                    +
                    +
                    + +
                    + + +
                    +
                    import {Component, Input, OnInit} from '@angular/core';
                    +import {MessageService} from "primeng/api";
                    +
                    +@Component({
                    +    selector: 'framadate-copy-text',
                    +    templateUrl: './copy-text.component.html',
                    +    styleUrls: ['./copy-text.component.scss']
                    +})
                    +export class CopyTextComponent implements OnInit {
                    +    @Input() public textToCopy: any;
                    +
                    +    constructor(private messageService: MessageService,) {
                    +    }
                    +
                    +    ngOnInit() {
                    +    }
                    +
                    +    handleClick() {
                    +        this.messageService.add({
                    +            severity: 'success',
                    +            summary: 'Texte copié',
                    +            detail: this.textToCopy
                    +        })
                    +    }
                    +
                    +}
                    +
                    +
                    + +
                    +
                    <button
                    +    (click)='handleClick()'
                    +    [cbContent]="textToCopy"
                    +    [ngxClipboard]
                    +    class=" btn btn--primary btn--outline"
                    +    id="copyLink" >
                    +    <i class='fa fa-copy' ></i >
                    +    {{"admin.copy_link" |translate}} " {{ textToCopy}}"
                    +</button >
                    +
                    +
                    + +
                    +

                    + ./copy-text.component.scss +

                    +
                    +
                    + +
                    +
                    +
                    +
                    + Legend +
                    +
                    +
                    Html element +
                    +
                    +
                    Component +
                    +
                    +
                    Html element with directive +
                    +
                    +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + +
                    +
                    +

                    result-matching ""

                    +
                      +
                      +
                      +

                      No results matching ""

                      +
                      +
                      +
                      + +
                      +
                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/CreateOrRetrieveComponent.html b/documentation/components/CreateOrRetrieveComponent.html new file mode 100644 index 00000000..249f3bf8 --- /dev/null +++ b/documentation/components/CreateOrRetrieveComponent.html @@ -0,0 +1,941 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                      +
                      + + +
                      +
                      + + + + + + + + +
                      +

                      +

                      File

                      +

                      +

                      + src/app/pages/create-or-retrieve/create-or-retrieve.component.ts +

                      + + +

                      +

                      Extends

                      +

                      +

                      + BaseComponent +

                      + +

                      +

                      Implements

                      +

                      +

                      + OnInit +

                      + + +
                      +

                      Metadata

                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      selectorframadate-create-or-retrieve
                      styleUrls./create-or-retrieve.component.scss
                      templateUrl./create-or-retrieve.component.html
                      +
                      + +
                      +

                      Index

                      + + + + + + + + + + + + + + + + + + + + + +
                      +
                      Properties
                      +
                      + +
                      +
                      Methods
                      +
                      + +
                      +
                      + +
                      +

                      Constructor

                      + + + + + + + + + + + + + +
                      +constructor(config: ConfigService) +
                      + +
                      +
                      + Parameters : + + + + + + + + + + + + + + + + + + +
                      NameTypeOptional
                      config + ConfigService + + No +
                      +
                      +
                      +
                      + + + + + +
                      + +

                      + Methods +

                      + + + + + + + + + + + + + + + + + + + +
                      + + + + findMyPollsByEmail + + + +
                      +findMyPollsByEmail(email: string) +
                      + +
                      + +
                      + Parameters : + + + + + + + + + + + + + + + + + + +
                      NameTypeOptional
                      email + string + + No +
                      +
                      +
                      +
                      +
                      + Returns : void + +
                      +
                      + +
                      +
                      + + + + + + + + + + + + + + + + + + + +
                      + + + + ngOnInit + + + +
                      +ngOnInit() +
                      + +
                      + +
                      + Returns : void + +
                      +
                      + + + + + + + + + + + + + + + + + + + +
                      + + + + trackFunction + + + +
                      +trackFunction(index: number, item: any) +
                      + +
                      + +
                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      NameTypeOptional
                      index + number + + No +
                      item + any + + No +
                      +
                      +
                      +
                      +
                      + Returns : number + +
                      +
                      + +
                      +
                      + + + + + + + + + + + + + + + + + + + + + + +
                      + + + + checkValidity + + + +
                      +checkValidity() +
                      +
                      Inherited from BaseComponent +
                      +
                      +
                      Defined in BaseComponent:21 +
                      +
                      + +
                      + Returns : boolean + +
                      +
                      + + + + + + + + + + + + + + + + + + + + + + +
                      + + + + displayErrorMessage + + + +
                      +displayErrorMessage() +
                      +
                      Inherited from BaseComponent +
                      +
                      +
                      Defined in BaseComponent:27 +
                      +
                      + +
                      + Returns : boolean + +
                      +
                      + + + + + + + + + + + + + + + + + + + + + + +
                      + + + + ngOnInit + + + +
                      +ngOnInit() +
                      +
                      Inherited from BaseComponent +
                      +
                      +
                      Defined in BaseComponent:17 +
                      +
                      + +
                      + Returns : void + +
                      +
                      +
                      +
                      + +

                      + Properties +

                      + + + + + + + + + + + + + + +
                      + + + + Public + config + + +
                      + Type : ConfigService + +
                      + +
                      + + + + + + + + + + + + + + + + + +
                      + + + + loadedMyPolls + + +
                      + Type : boolean + +
                      + Default value : false +
                      + +
                      + + + + + + + + + + + + + + + + + +
                      + + + + Public + config + + +
                      + Type : ConfigService + +
                      +
                      Inherited from BaseComponent +
                      +
                      +
                      Defined in BaseComponent:14 +
                      +
                      +
                      + +
                      + + +
                      +
                      import {Component, OnInit} from '@angular/core';
                      +import {BaseComponent} from "../base-page/base.component";
                      +import {ConfigService} from "../../services/config.service";
                      +
                      +@Component({
                      +    selector: 'framadate-create-or-retrieve',
                      +    templateUrl: './create-or-retrieve.component.html',
                      +    styleUrls: ['./create-or-retrieve.component.scss']
                      +})
                      +export class CreateOrRetrieveComponent extends BaseComponent implements OnInit {
                      +
                      +    loadedMyPolls: boolean = false;
                      +
                      +
                      +    constructor(public config: ConfigService) {
                      +        super(config);
                      +    }
                      +
                      +    ngOnInit() {
                      +        // if (!environment.production) {
                      +        //     this.findMyPollsByEmail('tktest@tktest.com')
                      +        // }
                      +
                      +    }
                      +
                      +    findMyPollsByEmail(email: string) {
                      +        if (!email) {
                      +            return
                      +        }
                      +        this.config.findPollsByEmail(email);
                      +        this.loadedMyPolls = true;
                      +    }
                      +
                      +    trackFunction(index: number, item: any): number {
                      +        return item.id;
                      +    };
                      +}
                      +
                      +
                      + +
                      +
                      <div class="container" >
                      +    <section class="creation" >
                      +        <h1 >
                      +            {{"creation.title"|translate}}
                      +        </h1 >
                      +        <p
                      +            class="description margin-btm-x5"
                      +            i18n >
                      +            {{"config.description"|translate}}
                      +        </p >
                      +        <div class="btn-next" >
                      +
                      +            <button
                      +                [routerLink]="'step/date'"
                      +                class="btn btn--full btn--primary" >
                      +                {{"config.letsgo"|translate}}
                      +            </button >
                      +
                      +        </div >
                      +    </section >
                      +
                      +    <section class="recuperation" >
                      +        <h1 class="margin-top-x8" >
                      +            {{"config.find_my_polls"|translate}}
                      +        </h1 >
                      +        <form
                      +            (ngSubmit)="findMyPollsByEmail(config.myEmail)"
                      +        >
                      +            <label
                      +                class="description"
                      +                for="sendemail"
                      +                i18n
                      +            >
                      +                <i class='fa fa-envelope' ></i >
                      +                {{"config.find_helper"|translate}} :
                      +            </label >
                      +            <input
                      +                [(ngModel)]="config.myEmail"
                      +                class='input'
                      +                autofocus="autofocus"
                      +                id="sendemail"
                      +                name="mail"
                      +                required="required"
                      +                type="email"
                      +            />
                      +            <input
                      +                [disabled]="!config.myEmail || !config.myEmail.length"
                      +                [ngClass]="{'btn--primary': config.myEmail}"
                      +                class="btn btn--full"
                      +                id='sendemailbutton'
                      +                i18n-value="'config.find_button'|translate"
                      +                type="submit"
                      +            />
                      +        </form >
                      +    </section >
                      +    <section
                      +        class="list-my-polls"
                      +        *ngIf="!config.loading" >
                      +        <h2 >
                      +            Mes Sondages trouvés:
                      +        </h2 >
                      +        <ul
                      +            class="poll-list"
                      +            *ngFor="let poll of config.myPolls ; index as i;trackBy trackFunction" >
                      +            <li >
                      +                <a href='{{poll.url}}' >
                      +                    {{poll.title}}
                      +                    <sub >
                      +                        {{poll.description}}
                      +                    </sub >
                      +                </a >
                      +            </li >
                      +        </ul >
                      +
                      +        <div
                      +            class="no-polls"
                      +            *ngIf="! config.myPolls || !config.myPolls.length" >
                      +            Aucun sondage.
                      +        </div >
                      +    </section >
                      +    <div
                      +        class="loading"
                      +        *ngIf="config.loading" >
                      +        <i class="fa fa-refresh fa-spin fa-3x fa-fw" ></i >
                      +    </div >
                      +
                      +</div >
                      +
                      +
                      + +
                      +

                      + ./create-or-retrieve.component.scss +

                      +
                      .container{
                      +  display:flex;
                      +  flex-direction: column;
                      +  margin:auto;
                      +}
                      +h1 {
                      +    display: inline-block;
                      +    margin-bottom: 3rem;
                      +    font-size: 2.6rem;
                      +
                      +    &::after {
                      +      content: "";
                      +      display: block;
                      +      width: 27.4%;
                      +      height: 2px;
                      +      margin-top: 5px;
                      +      margin-right: auto;
                      +      margin-left: auto;
                      +    //   background-color: $primary_color;
                      +    }
                      +  }
                      +label{
                      +  float:left;
                      +}
                      +input[type=email]{
                      +  display:block;
                      +}
                      +
                      +
                      + +
                      +
                      +
                      +
                      + Legend +
                      +
                      +
                      Html element +
                      +
                      +
                      Component +
                      +
                      +
                      Html element with directive +
                      +
                      +
                      + + +
                      + + + + + + + + + + + + + + + + + + + + + +
                      +
                      +

                      result-matching ""

                      +
                        +
                        +
                        +

                        No results matching ""

                        +
                        +
                        +
                        + +
                        +
                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DatesComponent.html b/documentation/components/DatesComponent.html new file mode 100644 index 00000000..e1783105 --- /dev/null +++ b/documentation/components/DatesComponent.html @@ -0,0 +1,1584 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                        +
                        + + +
                        +
                        + + + + + + + + +
                        +

                        +

                        File

                        +

                        +

                        + src/app/pages/dates/dates.component.ts +

                        + + +

                        +

                        Extends

                        +

                        +

                        + BaseComponent +

                        + +

                        +

                        Implements

                        +

                        +

                        + OnInit +

                        + + +
                        +

                        Metadata

                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                        selectorframadate-dates
                        styleUrls./dates.component.scss
                        templateUrl./dates.component.html
                        +
                        + +
                        +

                        Index

                        + + + + + + + + + + + + + + + + + + + + + +
                        +
                        Properties
                        +
                        + +
                        +
                        Methods
                        +
                        + +
                        +
                        + +
                        +

                        Constructor

                        + + + + + + + + + + + + + +
                        +constructor(config: ConfigService, cd: ChangeDetectorRef, messageService: MessageService, dateUtilities: DateUtilities, document: any) +
                        + +
                        +
                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                        NameTypeOptional
                        config + ConfigService + + No +
                        cd + ChangeDetectorRef + + No +
                        messageService + MessageService + + No +
                        dateUtilities + DateUtilities + + No +
                        document + any + + No +
                        +
                        +
                        +
                        + + + + + +
                        + +

                        + Methods +

                        + + + + + + + + + + + + + + + + + + + +
                        + + + + addDate + + + +
                        +addDate() +
                        + +
                        + +
                        + Returns : void + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + + addIntervalOfDates + + + +
                        +addIntervalOfDates() +
                        + +
                        +

                        add all the dates between the start and end dates in the interval section

                        +
                        + +
                        + Returns : void + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + + addTime + + + +
                        +addTime() +
                        + +
                        +

                        change time spans

                        +
                        + +
                        + Returns : void + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + + addTimeToDate + + + +
                        +addTimeToDate(config: any, id: number) +
                        + +
                        +

                        add a time period to a specific date choice, +focus on the new input

                        +
                        + +
                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                        NameTypeOptional
                        config + any + + No +
                        id + number + + No +
                        +
                        +
                        +
                        +
                        + Returns : void + +
                        +
                        + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + + countDays + + + +
                        +countDays() +
                        + +
                        + +
                        + Returns : void + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + + emptyAll + + + +
                        +emptyAll() +
                        + +
                        +

                        remove all input contents, does not reset to default

                        +
                        + +
                        + Returns : void + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + + ngOnInit + + + +
                        +ngOnInit() +
                        + +
                        +

                        set the interval options

                        +
                        + +
                        + Returns : void + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + + removeAllTimes + + + +
                        +removeAllTimes() +
                        + +
                        + +
                        + Returns : void + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + + resetTimes + + + +
                        +resetTimes() +
                        + +
                        + +
                        + Returns : void + +
                        +
                        + + + + + + + + + + + + + + + + + + + + + + +
                        + + + + checkValidity + + + +
                        +checkValidity() +
                        +
                        Inherited from BaseComponent +
                        +
                        +
                        Defined in BaseComponent:21 +
                        +
                        + +
                        + Returns : boolean + +
                        +
                        + + + + + + + + + + + + + + + + + + + + + + +
                        + + + + displayErrorMessage + + + +
                        +displayErrorMessage() +
                        +
                        Inherited from BaseComponent +
                        +
                        +
                        Defined in BaseComponent:27 +
                        +
                        + +
                        + Returns : boolean + +
                        +
                        + + + + + + + + + + + + + + + + + + + + + + +
                        + + + + ngOnInit + + + +
                        +ngOnInit() +
                        +
                        Inherited from BaseComponent +
                        +
                        +
                        Defined in BaseComponent:17 +
                        +
                        + +
                        + Returns : void + +
                        +
                        +
                        +
                        + +

                        + Properties +

                        + + + + + + + + + + + + + + +
                        + + + + Public + config + + +
                        + Type : ConfigService + +
                        + +
                        + + + + + + + + + + + + + + +
                        + + + + endDateInterval + + +
                        + Type : any + +
                        + +
                        + + + + + + + + + + + + + + +
                        + + + + intervalDays + + +
                        + Type : any + +
                        + +
                        + + + + + + + + + + + + + + + + + +
                        + + + + intervalDaysDefault + + +
                        + Type : number + +
                        + Default value : 7 +
                        + +
                        + + + + + + + + + + + + + + + + + +
                        + + + + showDateInterval + + +
                        + Type : boolean + +
                        + Default value : true +
                        + +
                        + + + + + + + + + + + + + + +
                        + + + + startDateInterval + + +
                        + Type : any + +
                        + +
                        + + + + + + + + + + + + + + + + + +
                        + + + + Public + config + + +
                        + Type : ConfigService + +
                        +
                        Inherited from BaseComponent +
                        +
                        +
                        Defined in BaseComponent:14 +
                        +
                        +
                        + +
                        + + +
                        +
                        import {ChangeDetectorRef, Component, Inject, OnInit} from '@angular/core';
                        +import {ConfigService} from '../../services/config.service';
                        +import {BaseComponent} from '../base-page/base.component';
                        +import {DOCUMENT} from '@angular/common';
                        +import {MessageService} from "primeng/api";
                        +import {otherDefaultDates} from "../../config/defaultConfigs";
                        +import {DateUtilities} from "../../config/DateUtilities";
                        +
                        +@Component({
                        +    selector: 'framadate-dates',
                        +    templateUrl: './dates.component.html',
                        +    styleUrls: ['./dates.component.scss']
                        +})
                        +export class DatesComponent extends BaseComponent implements OnInit {
                        +    showDateInterval: boolean = true;
                        +    startDateInterval: any;
                        +    intervalDays: any;
                        +    intervalDaysDefault: number = 7;
                        +    endDateInterval: any;
                        +
                        +    constructor(public config: ConfigService,
                        +                private cd: ChangeDetectorRef,
                        +                private messageService: MessageService,
                        +                private dateUtilities: DateUtilities,
                        +                @Inject(DOCUMENT) private document: any
                        +    ) {
                        +        super(config);
                        +    }
                        +
                        +    countDays() {
                        +        // compute the number of days in the date interval
                        +        if (this.endDateInterval && this.startDateInterval) {
                        +            this.intervalDays = (this.dateUtilities.dayDiff(this.endDateInterval, this.startDateInterval)).toFixed(0)
                        +        }
                        +    }
                        +
                        +    /**
                        +     * set the interval options
                        +     */
                        +    ngOnInit() {
                        +        let dateCurrent = new Date();
                        +        const dateJson = dateCurrent.toISOString();
                        +        this.startDateInterval = dateJson.substring(0, 10);
                        +        this.endDateInterval = this.dateUtilities.addDaysToDate(this.intervalDaysDefault, dateCurrent).toISOString().substring(0, 10);
                        +    }
                        +
                        +    addDate() {
                        +        this.config.dateList.push({
                        +            literal: '',
                        +            date_object: new Date(),
                        +            timeList: []
                        +        });
                        +        let selector = '[ng-reflect-name="dateChoices_' + (this.config.dateList.length - 1) + '"]';
                        +        this.cd.detectChanges();
                        +        const elem = this.document.querySelector(selector);
                        +        if (elem) {
                        +            elem.focus();
                        +        }
                        +    }
                        +
                        +    /**
                        +     * change time spans
                        +     */
                        +    addTime() {
                        +        this.config.timeList.push(
                        +            {
                        +                literal: '',
                        +                timeList: [],
                        +                date_object: new Date()
                        +            }
                        +        );
                        +    }
                        +
                        +    removeAllTimes() {
                        +        this.config.timeList = [];
                        +    }
                        +
                        +    resetTimes() {
                        +        this.config.timeList = otherDefaultDates;
                        +    }
                        +
                        +
                        +    /**
                        +     * add a time period to a specific date choice,
                        +     * focus on the new input
                        +     * @param config
                        +     * @param id
                        +     */
                        +    addTimeToDate(config: any, id: number) {
                        +        config.timeList.push({literal: ''});
                        +        let selector = '[ng-reflect-name="dateTime_' + id + '_Choices_' + (config.timeList.length - 1) + '"]';
                        +        this.cd.detectChanges();
                        +        const elem = this.document.querySelector(selector);
                        +        if (elem) {
                        +            elem.focus();
                        +        }
                        +    }
                        +
                        +    /**
                        +     * remove all input contents, does not reset to default
                        +     */
                        +    emptyAll() {
                        +        this.config.dateList.forEach(element => {
                        +            element.literal = '';
                        +            element.date_object = new Date();
                        +            element.timeList = ['', '', ''];
                        +        });
                        +        this.config.timeList.forEach(element => {
                        +            element.literal = '';
                        +        });
                        +    }
                        +
                        +
                        +    /**
                        +     * add all the dates between the start and end dates in the interval section
                        +     */
                        +    addIntervalOfDates() {
                        +        let newIntervalArray = this.dateUtilities.getDatesInRange(this.startDateInterval, this.endDateInterval, 1);
                        +
                        +        const converted = [];
                        +        newIntervalArray.forEach(element => {
                        +            converted.push({
                        +                literal: element.literal,
                        +                date_object: element.date_object,
                        +                timeList: []
                        +            });
                        +        });
                        +        this.config.dateList = [...new Set(converted)]; // add only dates that are not already present with a Set of unique items
                        +        this.showDateInterval = false;
                        +
                        +        this.messageService.add({
                        +            severity: 'success',
                        +            summary: 'Dates ajoutées',
                        +            detail: `les dates ont été ajoutées aux réponses possibles`
                        +        });
                        +
                        +    }
                        +
                        +
                        +}
                        +
                        +
                        + +
                        +
                        <div i18n >
                        +    {{"dates.title"|translate}}
                        +</div >
                        +
                        +<div >
                        +    <label for="multi_hours" >
                        +		<span >
                        +            {{"dates.hours_different"|translate}}
                        +		</span >
                        +        <select
                        +            [(ngModel)]="config.allowSeveralHours"
                        +            id="multi_hours"
                        +            name="multi_hours"
                        +        >
                        +            <option value=true >{{"dates.multiple.different"|translate}}</option >
                        +            <option value=false >{{"dates.multiple.identical"|translate}}</option >
                        +        </select >
                        +        <span i18n >
                        +            {{"dates.hours_each_day"|translate}}
                        +		</span >
                        +    </label >
                        +</div >
                        +
                        +<button
                        +    (click)="addDate()"
                        +    class="btn btn--primary"
                        +    id="add_date_button"
                        +>
                        +    <i class='fa fa-plus' ></i >
                        +    {{"dates.add"|translate}}
                        +</button >
                        +<button
                        +    (click)="showDateInterval = !showDateInterval "
                        +    [ngClass]="{active: showDateInterval}"
                        +    class="btn btn--primary"
                        +    id="toggle_interval_button"
                        +>
                        +    <i class='fa fa-clock-o' ></i >
                        +    {{"dates.add_interval"|translate}}
                        +</button >
                        +
                        +<button
                        +    (click)="emptyAll()"
                        +    class="btn btn--warning"
                        +    id="empty_button"
                        +>
                        +    <i class='fa fa-trash' ></i >
                        +    {{"dates.empty"|translate}}
                        +</button >
                        +<section
                        +    *ngIf="showDateInterval"
                        +    class="date-interval " >
                        +    <!--    TODO à mettre en popup-->
                        +    <hr >
                        +    <h2 > {{"dates.add_interval"|translate}}</h2 >
                        +    <p >
                        +        {{"dates.interval_propose"|translate}}
                        +        <input
                        +            (change)="countDays()"
                        +            [(ngModel)]="startDateInterval"
                        +            type="date" >
                        +        {{"dates.interval_span"|translate}}
                        +        <input
                        +            (change)="countDays()"
                        +            [(ngModel)]="endDateInterval"
                        +            type="date" >
                        +        <br >
                        +
                        +    </p >
                        +    <button
                        +        (click)="addIntervalOfDates()"
                        +        class="btn btn-block btn--primary" >
                        +        <i class='fa fa-plus' ></i >
                        +        {{"dates.interval_button"|translate}}
                        +        {{intervalDays}}
                        +        {{"dates.interval_button_dates"|translate}}
                        +    </button >
                        +    <hr >
                        +</section >
                        +<div class='columns' >
                        +    <div class='column' >
                        +        <div class="dates-list " >
                        +            <div class='title' >
                        +    <span class="count-dates" >
                        +    {{config.timeList.length}}
                        +    </span >
                        +                <span class="count-dates-txt " >
                        +		{{"dates.count_time"|translate}}
                        +                    (pour chaque jour)
                        +	</span >
                        +
                        +            </div >
                        +            <div class='actions' >
                        +                <button
                        +                    (click)="addTime()"
                        +                    *ngIf=" 'false' === config.allowSeveralHours "
                        +                    class="btn btn--primary"
                        +                    id="add_time_button"
                        +                >
                        +                    <i class='fa fa-plus' ></i >
                        +                    {{"dates.add_time"|translate}}
                        +                </button >
                        +                <button
                        +                    (click)="removeAllTimes()"
                        +                    *ngIf=" 'false' === config.allowSeveralHours "
                        +                    class="btn btn--warning"
                        +                    id="remove_time_button"
                        +                >
                        +                    <i class='fa fa-trash' ></i >
                        +                    Aucune plage horaire
                        +                </button >
                        +                <button
                        +                    (click)="resetTimes()"
                        +                    *ngIf=" 'false' === config.allowSeveralHours"
                        +                    class="btn btn--warning"
                        +                    id="reset_time_button"
                        +                >
                        +                    <i class='fa fa-refresh' ></i >
                        +                    réinitialiser
                        +                </button >
                        +            </div >
                        +
                        +            <div
                        +                *ngIf=" 'false' === config.allowSeveralHours"
                        +                class="identical-dates"
                        +            >
                        +                <div
                        +                    *ngFor="let time of config.timeList; index as id"
                        +                    class="time-choice"
                        +                >
                        +                    <label for='timeChoices_{{id}}' >
                        +                        <i class='fa fa-clock-o' ></i >
                        +                    </label >
                        +                    <input
                        +                        [(ngModel)]="time.literal"
                        +                        name="timeChoices_{{id}}"
                        +                        type="text"
                        +                        id='timeChoices_{{id}}'
                        +                    >
                        +                    <button
                        +                        (click)="time.timeList.splice(id, 1)"
                        +                        class="btn btn-warning" ><i class="fa fa-times" ></i >
                        +                    </button >
                        +                </div >
                        +            </div >
                        +            <hr >
                        +            <span class="count-dates title" >
                        +    {{config.dateList.length}}
                        +    </span >
                        +            <span >
                        +		{{"dates.count_dates"|translate}}
                        +	</span >
                        +            <button
                        +                class='btn btn--primary'
                        +                (click)='addDate()' >
                        +                {{"dates.add"|translate}}
                        +            </button >
                        +            <div
                        +                *ngFor="let choice of config.dateList; index as id"
                        +                class="date-choice"
                        +            >
                        +                {{id}})
                        +                <input
                        +                    [(ngModel)]="choice.date_object"
                        +                    name="dateChoices_{{id}}"
                        +                    id="dateChoices_{{id}}"
                        +                    useValueAsDate
                        +                    type="date"
                        +                >
                        +                <button
                        +                    (click)="config.dateList.splice(id, 1)"
                        +                    class="btn btn-warning"
                        +                ><i class="fa fa-times" ></i >
                        +                </button >
                        +                <button
                        +                    (click)="addTimeToDate(choice, id)"
                        +                    *ngIf=" 'true' === config.allowSeveralHours"
                        +                    class="btn btn--primary"
                        +                >
                        +                    {{"dates.add_time"|translate}}
                        +                </button >
                        +                <div
                        +                    *ngIf=" 'true' === config.allowSeveralHours"
                        +                    class="several-times"
                        +                >
                        +                    <pre class='debug padded warning' >
                        +                    choice.timeList :
                        +                        {{choice.timeList|json}}
                        +                    </pre >
                        +                    <h2 >Several hours</h2 >
                        +                    <div
                        +                        *ngFor="let timeItem of choice.timeList; index as idTime"
                        +                        class="time-choice"
                        +                    >
                        +                        <input
                        +                            [(ngModel)]="timeItem.literal"
                        +                            name="dateTime_{{id}}_Choices_{{idTime}}"
                        +                            id="dateTime_{{id}}_Choices_{{idTime}}"
                        +
                        +                            type="text"
                        +                        >
                        +                        <button
                        +                            (click)="choice.timeList.splice(idTime, 1)"
                        +                            class="btn btn-warning"
                        +                        ><i class="fa fa-times" ></i >
                        +                        </button >
                        +                    </div >
                        +                </div >
                        +            </div >
                        +        </div >
                        +    </div >
                        +    <div class='column' >
                        +        <framadate-resume ></framadate-resume >
                        +    </div >
                        +</div >
                        +
                        +<a
                        +    [routerLink]="'/step/resume'"
                        +    class="btn btn--full btn--primary"
                        +>
                        +    C'est parfait!
                        +</a >
                        +<a
                        +    [routerLink]="'/step/home'"
                        +    class="prev"
                        +>
                        +    Retour
                        +</a >
                        +
                        +
                        + +
                        +

                        + ./dates.component.scss +

                        +
                        .several-times {
                        +    padding-left: 1em;
                        +}
                        +
                        +.date-interval {
                        +    padding: 1em;
                        +    margin-bottom: 1em;
                        +}
                        +
                        +.title {
                        +    font-size: 1.5rem;
                        +}
                        +
                        +:host {
                        +    input, button {
                        +        + button {
                        +            margin-left: 1em;
                        +        }
                        +    }
                        +
                        +}
                        +
                        +
                        + +
                        +
                        +
                        +
                        + Legend +
                        +
                        +
                        Html element +
                        +
                        +
                        Component +
                        +
                        +
                        Html element with directive +
                        +
                        +
                        + + +
                        + + + + + + + + + + + + + + + + + + + + + +
                        +
                        +

                        result-matching ""

                        +
                          +
                          +
                          +

                          No results matching ""

                          +
                          +
                          +
                          + +
                          +
                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DebuggerComponent.html b/documentation/components/DebuggerComponent.html new file mode 100644 index 00000000..fa59d251 --- /dev/null +++ b/documentation/components/DebuggerComponent.html @@ -0,0 +1,646 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                          +
                          + + +
                          +
                          + + + + + + + + +
                          +

                          +

                          File

                          +

                          +

                          + src/app/debugger/debugger.component.ts +

                          + + + +

                          +

                          Implements

                          +

                          +

                          + OnInit +

                          + + +
                          +

                          Metadata

                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                          selectorframadate-debugger
                          styleUrls./debugger.component.scss
                          templateUrl./debugger.component.html
                          +
                          + +
                          +

                          Index

                          + + + + + + + + + + + + + + + + + + + + + +
                          +
                          Properties
                          +
                          + +
                          +
                          Methods
                          +
                          + +
                          +
                          + +
                          +

                          Constructor

                          + + + + + + + + + + + + + +
                          +constructor(config: ConfigService) +
                          + +
                          +
                          + Parameters : + + + + + + + + + + + + + + + + + + +
                          NameTypeOptional
                          config + ConfigService + + No +
                          +
                          +
                          +
                          + + + + + +
                          + +

                          + Methods +

                          + + + + + + + + + + + + + + + + + + + +
                          + + + + launchToast + + + +
                          +launchToast() +
                          + +
                          + +
                          + Returns : void + +
                          +
                          + + + + + + + + + + + + + + + + + + + +
                          + + + + ngOnInit + + + +
                          +ngOnInit() +
                          + +
                          + +
                          + Returns : void + +
                          +
                          + + + + + + + + + + + + + + + + + + + +
                          + + + + selectOption + + + +
                          +selectOption(key: string, val: any) +
                          + +
                          + +
                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                          NameTypeOptional
                          key + string + + No +
                          val + any + + No +
                          +
                          +
                          +
                          +
                          + Returns : boolean + +
                          +
                          + +
                          +
                          +
                          +
                          + +

                          + Properties +

                          + + + + + + + + + + + + + + +
                          + + + + Public + config + + +
                          + Type : ConfigService + +
                          + +
                          + + + + + + + + + + + + + + +
                          + + + + formIsValid + + +
                          + Default value : true +
                          + +
                          +
                          + +
                          + + +
                          +
                          import {Component, OnInit} from '@angular/core';
                          +import {ConfigService} from '../services/config.service';
                          +
                          +@Component({
                          +    selector: 'framadate-debugger',
                          +    templateUrl: './debugger.component.html',
                          +    styleUrls: ['./debugger.component.scss']
                          +})
                          +export class DebuggerComponent implements OnInit {
                          +    formIsValid = true;
                          +
                          +    constructor(public config: ConfigService) {
                          +    }
                          +
                          +    ngOnInit() {
                          +    }
                          +
                          +    selectOption(key: string, val: any) {
                          +        if (!this.config[key]) {
                          +            return false;
                          +        }
                          +        this.config[key] = val;
                          +
                          +        return true;
                          +    }
                          +
                          +    launchToast() {
                          +        this.config.handleError({message: "hop"})
                          +    }
                          +}
                          +
                          +
                          + +
                          +
                          <div class="well debug" >
                          +    <strong >
                          +        <h2 i18n >
                          +            infos de debug
                          +        </h2 >
                          +        <span class="demo" >
                          +		{{"config.demo"|translate}}
                          +		</span >
                          +    </strong >
                          +    <ul >
                          +        <li >
                          +            étape actuelle {{config.step}} / {{config.stepMax}}
                          +        </li >
                          +        <li >
                          +            formulaire valide : {{formIsValid}}
                          +        </li >
                          +        <li >
                          +            type de formulaire: {{config.pollType}}
                          +        </li >
                          +    </ul >
                          +    <button
                          +        class="btn btn--primary"
                          +        i18n
                          +        (click)="config.createPoll()"
                          +    >
                          +        Envoyer le formulaire
                          +    </button >
                          +    <button
                          +        class="btn btn--primary"
                          +        i18n
                          +        (click)="config.getPollById( '1', 'example password')"
                          +    >
                          +        get poll 1
                          +    </button >
                          +    <button
                          +        class="btn btn--primary"
                          +        i18n
                          +        (click)="config.getMyPolls( 'tktest@tktest.com')"
                          +    >
                          +        get my polls
                          +    </button >
                          +    <button
                          +        class="btn btn--success"
                          +        (click)="launchToast()" >
                          +        launch success toast
                          +    </button >
                          +    <a
                          +        [routerLink]="'/vote/poll/id/3'"
                          +        class="btn btn--success" >
                          +        See example of vote page
                          +    </a >
                          +</div >
                          +
                          +
                          + +
                          +

                          + ./debugger.component.scss +

                          +
                          +
                          + +
                          +
                          +
                          +
                          + Legend +
                          +
                          +
                          Html element +
                          +
                          +
                          Component +
                          +
                          +
                          Html element with directive +
                          +
                          +
                          + + +
                          + + + + + + + + + + + + + + + + + + + + + +
                          +
                          +

                          result-matching ""

                          +
                            +
                            +
                            +

                            No results matching ""

                            +
                            +
                            +
                            + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EndConfirmationComponent.html b/documentation/components/EndConfirmationComponent.html new file mode 100644 index 00000000..9fcab368 --- /dev/null +++ b/documentation/components/EndConfirmationComponent.html @@ -0,0 +1,919 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                            +
                            + + +
                            +
                            + + + + + + + + +
                            +

                            +

                            File

                            +

                            +

                            + src/app/pages/end-confirmation/end-confirmation.component.ts +

                            + + +

                            +

                            Extends

                            +

                            +

                            + BaseComponent +

                            + +

                            +

                            Implements

                            +

                            +

                            + OnInit +

                            + + +
                            +

                            Metadata

                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            selectorframadate-end-confirmation
                            styleUrls./end-confirmation.component.scss
                            templateUrl./end-confirmation.component.html
                            +
                            + +
                            +

                            Index

                            + + + + + + + + + + + + + + + + + + + + + +
                            +
                            Properties
                            +
                            + +
                            +
                            Methods
                            +
                            + +
                            +
                            + +
                            +

                            Constructor

                            + + + + + + + + + + + + + +
                            +constructor(config: ConfigService, http: HttpClient, messageService: MessageService) +
                            + +
                            +
                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            NameTypeOptional
                            config + ConfigService + + No +
                            http + HttpClient + + No +
                            messageService + MessageService + + No +
                            +
                            +
                            +
                            + + + + + +
                            + +

                            + Methods +

                            + + + + + + + + + + + + + + + + + + + +
                            + + + + copyLink + + + +
                            +copyLink(str: any) +
                            + +
                            + +
                            + Parameters : + + + + + + + + + + + + + + + + + + +
                            NameTypeOptional
                            str + any + + No +
                            +
                            +
                            +
                            +
                            + Returns : void + +
                            +
                            + +
                            +
                            + + + + + + + + + + + + + + + + + + + +
                            + + + + ngOnInit + + + +
                            +ngOnInit() +
                            + +
                            + +
                            + Returns : void + +
                            +
                            + + + + + + + + + + + + + + + + + + + +
                            + + + + sendToEmail + + + +
                            +sendToEmail() +
                            + +
                            + +
                            + Returns : void + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + checkValidity + + + +
                            +checkValidity() +
                            +
                            Inherited from BaseComponent +
                            +
                            +
                            Defined in BaseComponent:21 +
                            +
                            + +
                            + Returns : boolean + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + displayErrorMessage + + + +
                            +displayErrorMessage() +
                            +
                            Inherited from BaseComponent +
                            +
                            +
                            Defined in BaseComponent:27 +
                            +
                            + +
                            + Returns : boolean + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + ngOnInit + + + +
                            +ngOnInit() +
                            +
                            Inherited from BaseComponent +
                            +
                            +
                            Defined in BaseComponent:17 +
                            +
                            + +
                            + Returns : void + +
                            +
                            +
                            +
                            + +

                            + Properties +

                            + + + + + + + + + + + + + + +
                            + + + + Public + config + + +
                            + Type : ConfigService + +
                            + +
                            + + + + + + + + + + + + + + +
                            + + + + Public + http + + +
                            + Type : HttpClient + +
                            + +
                            + + + + + + + + + + + + + + + + + +
                            + + + + mailToRecieve + + +
                            + Type : string + +
                            + Default value : '' +
                            + +
                            + + + + + + + + + + + + + + + + + +
                            + + + + Public + config + + +
                            + Type : ConfigService + +
                            +
                            Inherited from BaseComponent +
                            +
                            +
                            Defined in BaseComponent:14 +
                            +
                            +
                            + +
                            + + +
                            +
                            import {Component, OnInit} from '@angular/core';
                            +import {BaseComponent} from '../base-page/base.component';
                            +import {HttpClient} from '@angular/common/http';
                            +import {ConfigService} from "../../services/config.service";
                            +import {MessageService} from 'primeng/api';
                            +
                            +@Component({
                            +    selector: 'framadate-end-confirmation',
                            +    templateUrl: './end-confirmation.component.html',
                            +    styleUrls: ['./end-confirmation.component.scss']
                            +})
                            +export class EndConfirmationComponent extends BaseComponent implements OnInit {
                            +    mailToRecieve = '';
                            +
                            +    constructor(public config: ConfigService,
                            +                public http: HttpClient,
                            +                private messageService: MessageService
                            +    ) {
                            +        super(config);
                            +        this.mailToRecieve = this.config.myEmail;
                            +    }
                            +
                            +    ngOnInit() {
                            +    }
                            +
                            +    copyLink(str: any) {
                            +        this.messageService.add({
                            +            severity: 'success',
                            +            summary: 'Lien copié',
                            +            detail: str
                            +        });
                            +    }
                            +
                            +    sendToEmail() {
                            +
                            +    }
                            +}
                            +
                            +
                            + +
                            +
                            <h1 i18n >
                            +    {{"resume.title"|translate}}
                            +</h1 >
                            +<section class="admin" >
                            +    <h2 i18n >{{"resume.admins"|translate}}</h2 >
                            +    <p >
                            +
                            +        Votre sondage « 
                            +        <span class="poll-title" >
                            +        {{config.title}}
                            +        </span >
                            +         » a bien été créé !
                            +    </p >
                            +    <p >
                            +        Voici les liens d’accès au sondage, conservez-les soigneusement !
                            +        (Si vous les perdez vous pourrez toujours les recevoir par email)
                            +    </p >
                            +
                            +    <p >
                            +        Pour accéder au sondage et à tous ses paramètres :
                            +        <a href="{{config.urlAdmin}}" >{{config.urlAdmin}}
                            +        </a >
                            +    </p >
                            +    <framadate-copy-text [textToCopy]='config.urlAdmin' ></framadate-copy-text >
                            +    <a href="{{config.urlAdmin}}" >
                            +        Voir le sondage coté administrateur·ice
                            +    </a >
                            +    <p class="note" >
                            +        Note : Le sondage sera supprimé {{config.deletionDateAfterLastModification}} jours après la date de sa dernière
                            +        modification.
                            +    </p >
                            +
                            +</section >
                            +<section class="public" >
                            +
                            +    <h2 i18n >{{"resume.users"|translate}}</h2 >
                            +    <p >
                            +        Pour accéder au sondage :
                            +        <a href="{{config.urlPublic}}" >{{config.urlPublic}}
                            +        </a >
                            +
                            +    </p >
                            +    <framadate-copy-text [textToCopy]='config.urlPublic' ></framadate-copy-text >
                            +    <a href="{{config.urlPublic}}" >
                            +        Voir le sondage
                            +    </a >
                            +</section >
                            +<section class="mail" >
                            +
                            +    <h2 i18n >{{"resume.links_mail"|translate}}</h2 >
                            +    <p >
                            +        Pour être sur de retrouver ces liens, nous pouvons vous les envoyer sur votre mail
                            +
                            +        mail :
                            +        <input
                            +            type="email"
                            +            [(ngModel)]="mailToRecieve"
                            +            paceholder="email"
                            +        >
                            +
                            +    </p >
                            +
                            +    <button
                            +        class="btn btn--primary"
                            +        (click)="sendToEmail()"
                            +    ><i class="fa fa-paper-plane" ></i >
                            +        Envoyer les liens du sondage
                            +    </button >
                            +    <a href="{{config.urlPublic}}" >
                            +        Voir le sondage
                            +    </a >
                            +
                            +</section >
                            +
                            +
                            +
                            + +
                            +

                            + ./end-confirmation.component.scss +

                            +
                            :host {
                            +    button {
                            +        margin-right: 1em;
                            +    }
                            +}
                            +
                            +
                            + +
                            +
                            +
                            +
                            + Legend +
                            +
                            +
                            Html element +
                            +
                            +
                            Component +
                            +
                            +
                            Html element with directive +
                            +
                            +
                            + + +
                            + + + + + + + + + + + + + + + + + + + + + +
                            +
                            +

                            result-matching ""

                            +
                              +
                              +
                              +

                              No results matching ""

                              +
                              +
                              +
                              + +
                              +
                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ErasableInputComponent.html b/documentation/components/ErasableInputComponent.html new file mode 100644 index 00000000..de077357 --- /dev/null +++ b/documentation/components/ErasableInputComponent.html @@ -0,0 +1,470 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                              +
                              + + +
                              +
                              + + + + + + + + +
                              +

                              +

                              File

                              +

                              +

                              + src/app/ui/erasable-input/erasable-input.component.ts +

                              + + + +

                              +

                              Implements

                              +

                              +

                              + OnInit +

                              + + +
                              +

                              Metadata

                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                              selectorframadate-erasable-input
                              styleUrls./erasable-input.component.scss
                              templateUrl./erasable-input.component.html
                              +
                              + +
                              +

                              Index

                              + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                              +
                              Methods
                              +
                              + +
                              +
                              Inputs
                              +
                              + +
                              +
                              Outputs
                              +
                              + +
                              +
                              + +
                              +

                              Constructor

                              + + + + + + + + + + +
                              +constructor() +
                              + +
                              +
                              + +
                              +

                              Inputs

                              + + + + + + + + + +
                              + + inputModel +
                              + +
                              +
                              +
                              +

                              Outputs

                              + + + + + + + + + + + + +
                              + + inputModelChange +
                              + Type : EventEmitter + +
                              + +
                              +
                              + + +
                              + +

                              + Methods +

                              + + + + + + + + + + + + + + + + + + + +
                              + + + + eraseInput + + + +
                              +eraseInput() +
                              + +
                              + +
                              + Returns : void + +
                              +
                              + + + + + + + + + + + + + + + + + + + +
                              + + + + ngOnInit + + + +
                              +ngOnInit() +
                              + +
                              + +
                              + Returns : void + +
                              +
                              +
                              + +
                              + + +
                              +
                              import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
                              +
                              +@Component({
                              +    selector: 'framadate-erasable-input',
                              +    templateUrl: './erasable-input.component.html',
                              +    styleUrls: ['./erasable-input.component.scss']
                              +})
                              +export class ErasableInputComponent implements OnInit {
                              +    @Output() inputModelChange = new EventEmitter();
                              +
                              +    @Input() inputModel;
                              +
                              +    constructor() {
                              +    }
                              +
                              +    ngOnInit() {
                              +    }
                              +
                              +    eraseInput() {
                              +        //
                              +        this.inputModelChange.emit('');
                              +        // TODO focus on other element
                              +    }
                              +
                              +}
                              +
                              +
                              + +
                              +
                              <button
                              +    class="erase btn btn--warning"
                              +    *ngIf='inputModel.length'
                              +    (click)="eraseInput()" >
                              +    <i class="fa fa-times" ></i >
                              +</button >
                              +
                              +
                              + +
                              +

                              + ./erasable-input.component.scss +

                              +
                              +
                              + +
                              +
                              +
                              +
                              + Legend +
                              +
                              +
                              Html element +
                              +
                              +
                              Component +
                              +
                              +
                              Html element with directive +
                              +
                              +
                              + + +
                              + + + + + + + + + + + + + + + + + + + + + +
                              +
                              +

                              result-matching ""

                              +
                                +
                                +
                                +

                                No results matching ""

                                +
                                +
                                +
                                + +
                                +
                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/HeaderComponent.html b/documentation/components/HeaderComponent.html new file mode 100644 index 00000000..b2a97361 --- /dev/null +++ b/documentation/components/HeaderComponent.html @@ -0,0 +1,346 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                                +
                                + + +
                                +
                                + + + + + + + + +
                                +

                                +

                                File

                                +

                                +

                                + src/app/header/header.component.ts +

                                + + + +

                                +

                                Implements

                                +

                                +

                                + OnInit +

                                + + +
                                +

                                Metadata

                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                selectorframadate-header
                                styleUrls./header.component.scss
                                templateUrl./header.component.html
                                +
                                + +
                                +

                                Index

                                + + + + + + + + + + + + + + + +
                                +
                                Methods
                                +
                                + +
                                +
                                + +
                                +

                                Constructor

                                + + + + + + + + + + +
                                +constructor() +
                                + +
                                +
                                + + + + + +
                                + +

                                + Methods +

                                + + + + + + + + + + + + + + + + + + + +
                                + + + + ngOnInit + + + +
                                +ngOnInit() +
                                + +
                                + +
                                + Returns : void + +
                                +
                                +
                                + +
                                + + +
                                +
                                import { Component, OnInit } from '@angular/core';
                                +
                                +@Component({
                                +  selector: 'framadate-header',
                                +  templateUrl: './header.component.html',
                                +  styleUrls: ['./header.component.scss']
                                +})
                                +export class HeaderComponent implements OnInit {
                                +
                                +  constructor() { }
                                +
                                +  ngOnInit() {
                                +  }
                                +
                                +}
                                +
                                +
                                + +
                                +
                                <p>(progression)</p>
                                +<!--TODO-->
                                +
                                +
                                + +
                                +

                                + ./header.component.scss +

                                +
                                +
                                + +
                                +
                                +
                                +
                                + Legend +
                                +
                                +
                                Html element +
                                +
                                +
                                Component +
                                +
                                +
                                Html element with directive +
                                +
                                +
                                + + +
                                + + + + + + + + + + + + + + + + + + + + + +
                                +
                                +

                                result-matching ""

                                +
                                  +
                                  +
                                  +

                                  No results matching ""

                                  +
                                  +
                                  +
                                  + +
                                  +
                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/HomeComponent.html b/documentation/components/HomeComponent.html new file mode 100644 index 00000000..ade5b8a9 --- /dev/null +++ b/documentation/components/HomeComponent.html @@ -0,0 +1,783 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                                  +
                                  + + +
                                  +
                                  + + + + + + + + +
                                  +

                                  +

                                  File

                                  +

                                  +

                                  + src/app/pages/home/home.component.ts +

                                  + + +

                                  +

                                  Extends

                                  +

                                  +

                                  + BaseComponent +

                                  + +

                                  +

                                  Implements

                                  +

                                  +

                                  + OnInit +

                                  + + +
                                  +

                                  Metadata

                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                  selectorframadate-home
                                  styleUrls./home.component.scss
                                  templateUrl./home.component.html
                                  +
                                  + +
                                  +

                                  Index

                                  + + + + + + + + + + + + + + + + + + + + + +
                                  +
                                  Properties
                                  +
                                  + +
                                  +
                                  Methods
                                  +
                                  + +
                                  +
                                  + +
                                  +

                                  Constructor

                                  + + + + + + + + + + + + + +
                                  +constructor(config: ConfigService) +
                                  + +
                                  +
                                  + Parameters : + + + + + + + + + + + + + + + + + + +
                                  NameTypeOptional
                                  config + ConfigService + + No +
                                  +
                                  +
                                  +
                                  + + + + + +
                                  + +

                                  + Methods +

                                  + + + + + + + + + + + + + + + + + + + +
                                  + + + + ngOnInit + + + +
                                  +ngOnInit() +
                                  + +
                                  + +
                                  + Returns : void + +
                                  +
                                  + + + + + + + + + + + + + + + + + + + + + + +
                                  + + + + checkValidity + + + +
                                  +checkValidity() +
                                  +
                                  Inherited from BaseComponent +
                                  +
                                  +
                                  Defined in BaseComponent:21 +
                                  +
                                  + +
                                  + Returns : boolean + +
                                  +
                                  + + + + + + + + + + + + + + + + + + + + + + +
                                  + + + + displayErrorMessage + + + +
                                  +displayErrorMessage() +
                                  +
                                  Inherited from BaseComponent +
                                  +
                                  +
                                  Defined in BaseComponent:27 +
                                  +
                                  + +
                                  + Returns : boolean + +
                                  +
                                  + + + + + + + + + + + + + + + + + + + + + + +
                                  + + + + ngOnInit + + + +
                                  +ngOnInit() +
                                  +
                                  Inherited from BaseComponent +
                                  +
                                  +
                                  Defined in BaseComponent:17 +
                                  +
                                  + +
                                  + Returns : void + +
                                  +
                                  +
                                  +
                                  + +

                                  + Properties +

                                  + + + + + + + + + + + + + + +
                                  + + + + Public + config + + +
                                  + Type : ConfigService + +
                                  + +
                                  + + + + + + + + + + + + + + + + + +
                                  + + + + nextStep + + +
                                  + Type : string + +
                                  + Default value : '/step/answers' +
                                  + +
                                  + + + + + + + + + + + + + + + + + +
                                  + + + + Public + config + + +
                                  + Type : ConfigService + +
                                  +
                                  Inherited from BaseComponent +
                                  +
                                  +
                                  Defined in BaseComponent:14 +
                                  +
                                  +
                                  + +
                                  + + +
                                  +
                                  import {Component, OnInit} from '@angular/core';
                                  +import {ConfigService} from "../../services/config.service";
                                  +import {BaseComponent} from "../base-page/base.component";
                                  +
                                  +@Component({
                                  +    selector: 'framadate-home',
                                  +    templateUrl: './home.component.html',
                                  +    styleUrls: ['./home.component.scss']
                                  +})
                                  +export class HomeComponent extends BaseComponent implements OnInit {
                                  +
                                  +    nextStep = '/step/answers';
                                  +    constructor(public config: ConfigService) {
                                  +        super(config);
                                  +    }
                                  +
                                  +    ngOnInit() {
                                  +    }
                                  +
                                  +}
                                  +
                                  +
                                  + +
                                  +
                                  <div class="description" >
                                  +    <router-outlet ></router-outlet >
                                  +    <h1 i18n >
                                  +        {{"creation.title"|translate}}
                                  +    </h1 >
                                  +    <span
                                  +        class="pre-selector"
                                  +        i18n
                                  +    >
                                  +		{{"creation.want"|translate}}
                                  +	</span >
                                  +    <button
                                  +        (click)='config.resetConfig()'
                                  +        class='btn btn--warning' >
                                  +        Reset all
                                  +    </button >
                                  +    <select
                                  +        [(ngModel)]="config.pollType"
                                  +        autofocus="autofocus"
                                  +        id="selector"
                                  +        name='polltype'
                                  +    >
                                  +        <option
                                  +            value="dates"
                                  +            name='polltype_date' >
                                  +            {{"creation.kind.date"|translate}}
                                  +        </option >
                                  +        <option
                                  +            value="classic"
                                  +            name='polltype_classic' >
                                  +            {{"creation.kind.classic"|translate}}
                                  +        </option >
                                  +    </select >
                                  +
                                  +    <span class="post-selector" >
                                  +	</span >
                                  +
                                  +    <div >
                                  +
                                  +        <label
                                  +            class="title-label"
                                  +            for="poll_title"
                                  +            i18n
                                  +        >
                                  +            {{"creation.choose_title"|translate}}
                                  +        </label >
                                  +        <input
                                  +            [(ngModel)]="config.title"
                                  +            id="poll_title"
                                  +            name="poll_title"
                                  +            placeholder="{{'creation.choose_title_placeholder'|translate}}"
                                  +            type="name"
                                  +        >
                                  +        <framadate-erasable-input [(inputModel)]="config.title" ></framadate-erasable-input >
                                  +    </div >
                                  +
                                  +    <div >
                                  +        <label for="my_name" >
                                  +            {{"creation.name"|translate}} :
                                  +        </label >
                                  +        <input
                                  +            [(ngModel)]="config.myName"
                                  +            id="my_name"
                                  +            name="my_name"
                                  +            placeholder="{{'creation.name_placeholder'|translate}}"
                                  +            type="name"
                                  +        >
                                  +        <framadate-erasable-input [(inputModel)]="config.myName" ></framadate-erasable-input >
                                  +    </div >
                                  +
                                  +    <div >
                                  +        <label
                                  +            class="title-label"
                                  +            for="poll_description"
                                  +            i18n
                                  +        >
                                  +            {{"creation.description"|translate}}:
                                  +            <framadate-erasable-input [(inputModel)]="config.description" ></framadate-erasable-input >
                                  +        </label >
                                  +        <br >
                                  +        <textarea
                                  +            [(ngModel)]="config.description"
                                  +            cols="50"
                                  +            id="poll_description"
                                  +            lines="5"
                                  +            name="poll_description"
                                  +            placeholder="description"
                                  +        ></textarea >
                                  +    </div >
                                  +    <div >
                                  +        <label for="email" >
                                  +            Mon email pour administrer le sondage est
                                  +        </label >
                                  +        <input
                                  +            [(ngModel)]="config.myEmail"
                                  +            autofocus="autofocus"
                                  +            id="email"
                                  +            name="mail"
                                  +            required="required"
                                  +            type="email"
                                  +        />
                                  +        <framadate-erasable-input [(inputModel)]="config.myEmail" ></framadate-erasable-input >
                                  +    </div >
                                  +
                                  +    <button
                                  +        [routerLink]="'/step/answers'"
                                  +        class="btn btn--primary btn--full"
                                  +        *ngIf="config.pollType == 'classic'"
                                  +        i18n
                                  +    >
                                  +        Continuer
                                  +        <i class='fa fa-file-text' ></i >
                                  +    </button >
                                  +    <button
                                  +        [routerLink]="'/step/date'"
                                  +        class="btn btn--primary btn--full"
                                  +        *ngIf="config.pollType == 'dates'"
                                  +        i18n
                                  +    >
                                  +        Continuer
                                  +        <i class='fa fa-calendar-check-o' ></i >
                                  +    </button >
                                  +    <a
                                  +        [routerLink]="'/step/creation'"
                                  +        class="prev"
                                  +        i18n
                                  +    >
                                  +        Retour
                                  +    </a >
                                  +    <hr >
                                  +</div >
                                  +
                                  +
                                  + +
                                  +

                                  + ./home.component.scss +

                                  +
                                  +
                                  + +
                                  +
                                  +
                                  +
                                  + Legend +
                                  +
                                  +
                                  Html element +
                                  +
                                  +
                                  Component +
                                  +
                                  +
                                  Html element with directive +
                                  +
                                  +
                                  + + +
                                  + + + + + + + + + + + + + + + + + + + + + +
                                  +
                                  +

                                  result-matching ""

                                  +
                                    +
                                    +
                                    +

                                    No results matching ""

                                    +
                                    +
                                    +
                                    + +
                                    +
                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/KindComponent.html b/documentation/components/KindComponent.html new file mode 100644 index 00000000..73fdd74b --- /dev/null +++ b/documentation/components/KindComponent.html @@ -0,0 +1,982 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                                    +
                                    + + +
                                    +
                                    + + + + + + + + +
                                    +

                                    +

                                    File

                                    +

                                    +

                                    + src/app/pages/kind/kind.component.ts +

                                    + + +

                                    +

                                    Extends

                                    +

                                    +

                                    + BaseComponent +

                                    + +

                                    +

                                    Implements

                                    +

                                    +

                                    + OnInit +

                                    + + +
                                    +

                                    Metadata

                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                    selectorframadate-page-kind
                                    styleUrls./kind.component.scss
                                    templateUrl./kind.component.html
                                    +
                                    + +
                                    +

                                    Index

                                    + + + + + + + + + + + + + + + + + + + + + +
                                    +
                                    Properties
                                    +
                                    + +
                                    +
                                    Methods
                                    +
                                    + +
                                    +
                                    + +
                                    +

                                    Constructor

                                    + + + + + + + + + + + + + +
                                    +constructor(config: ConfigService) +
                                    + +
                                    +
                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                    NameTypeOptional
                                    config + ConfigService + + No +
                                    +
                                    +
                                    +
                                    + + + + + +
                                    + +

                                    + Methods +

                                    + + + + + + + + + + + + + + + + + + + +
                                    + + + + ngOnInit + + + +
                                    +ngOnInit() +
                                    + +
                                    + +
                                    + Returns : void + +
                                    +
                                    + + + + + + + + + + + + + + + + + + + + + + +
                                    + + + + checkValidity + + + +
                                    +checkValidity() +
                                    +
                                    Inherited from BaseComponent +
                                    +
                                    +
                                    Defined in BaseComponent:21 +
                                    +
                                    + +
                                    + Returns : boolean + +
                                    +
                                    + + + + + + + + + + + + + + + + + + + + + + +
                                    + + + + displayErrorMessage + + + +
                                    +displayErrorMessage() +
                                    +
                                    Inherited from BaseComponent +
                                    +
                                    +
                                    Defined in BaseComponent:27 +
                                    +
                                    + +
                                    + Returns : boolean + +
                                    +
                                    + + + + + + + + + + + + + + + + + + + + + + +
                                    + + + + ngOnInit + + + +
                                    +ngOnInit() +
                                    +
                                    Inherited from BaseComponent +
                                    +
                                    +
                                    Defined in BaseComponent:17 +
                                    +
                                    + +
                                    + Returns : void + +
                                    +
                                    +
                                    +
                                    + +

                                    + Properties +

                                    + + + + + + + + + + + + + + +
                                    + + + + Public + config + + +
                                    + Type : ConfigService + +
                                    + +
                                    + + + + + + + + + + + + + + + + + +
                                    + + + + Public + config + + +
                                    + Type : ConfigService + +
                                    +
                                    Inherited from BaseComponent +
                                    +
                                    +
                                    Defined in BaseComponent:14 +
                                    +
                                    +
                                    + +
                                    + + +
                                    +
                                    import {Component, OnInit} from '@angular/core';
                                    +import {BaseComponent} from '../base-page/base.component';
                                    +import {ConfigService} from '../../services/config.service';
                                    +
                                    +@Component({
                                    +    selector: 'framadate-page-kind',
                                    +    templateUrl: './kind.component.html',
                                    +    styleUrls: ['./kind.component.scss']
                                    +})
                                    +export class KindComponent extends BaseComponent implements OnInit {
                                    +
                                    +    constructor(public config: ConfigService) {
                                    +        super(config);
                                    +    }
                                    +
                                    +    ngOnInit() {
                                    +    }
                                    +
                                    +}
                                    +
                                    +
                                    + +
                                    +
                                    <h1 >page de démo</h1 >
                                    +<p >cette étape est en cours de développement. <br > S'inspirer de la page de Home pour réaliser d'autres pages
                                    +</p >
                                    +<a
                                    +    [routerLink]="'/step/end'"
                                    +    class="btn btn--primary"
                                    +    i18n="@@confirm" >C'est parfait!</a >
                                    +<h1 >Atoms</h1 >
                                    +<section >
                                    +    <article >
                                    +        <h2 >Headings</h2 >
                                    +
                                    +        <h1 >Ceci est un h1</h1 >
                                    +        <h2 >Ceci est un h2</h2 >
                                    +        <h3 >Ceci est un h3</h3 >
                                    +    </article >
                                    +
                                    +    <article >
                                    +        <h2 >Links</h2 >
                                    +        <div >
                                    +            <a
                                    +                [routerLink]="'/home'"
                                    +                class="next" >
                                    +                <span
                                    +                    class="text"
                                    +                    i18n >
                                    +                    C'est parti !
                                    +                </span >
                                    +            </a >
                                    +        </div >
                                    +        <div >
                                    +            <a
                                    +                [routerLink]="'/home'"
                                    +                class="prev" >
                                    +                <span
                                    +                    class="text"
                                    +                    i18n >
                                    +                    C'est parti !
                                    +                </span >
                                    +            </a >
                                    +        </div >
                                    +    </article >
                                    +
                                    +    <article >
                                    +        <h2 >Buttons</h2 >
                                    +
                                    +        <button
                                    +            type="submit"
                                    +            class="btn btn--primary" >
                                    +            primary - default
                                    +        </button >
                                    +
                                    +        <br >
                                    +
                                    +        <button
                                    +            type="submit"
                                    +            class="btn btn--primary btn--small" >
                                    +            primary - small
                                    +        </button >
                                    +
                                    +        <br >
                                    +
                                    +        <a
                                    +            href="#"
                                    +            class="btn btn--primary btn--outline" >
                                    +            primary - outline - default
                                    +        </a >
                                    +
                                    +        <br >
                                    +
                                    +        <button
                                    +            type="submit"
                                    +            class="btn btn--primary btn--outline btn--small" >
                                    +            primary - outline - small
                                    +        </button >
                                    +
                                    +        <br >
                                    +
                                    +        <input
                                    +            type="submit"
                                    +            class="btn btn--alert"
                                    +            value="alert - default" >
                                    +
                                    +        <br >
                                    +
                                    +        <button
                                    +            type="submit"
                                    +            class="btn btn--alert btn--small" >
                                    +            alert - small
                                    +        </button >
                                    +
                                    +        <br >
                                    +
                                    +        <button
                                    +            type="submit"
                                    +            class="btn btn--alert btn--outline" >
                                    +            alert - outline - default
                                    +        </button >
                                    +
                                    +        <br >
                                    +
                                    +        <button
                                    +            type="submit"
                                    +            class="btn btn--alert btn--outline btn--small" >
                                    +            alert - outline - small
                                    +        </button >
                                    +
                                    +        <br ><br >
                                    +
                                    +        <button
                                    +            type="submit"
                                    +            class="btn btn--primary btn--full" >
                                    +            primary - full
                                    +        </button >
                                    +
                                    +        <button
                                    +            type="submit"
                                    +            class="btn btn--primary btn--outline btn--full" >
                                    +            primary - outline - full
                                    +        </button >
                                    +
                                    +        <button
                                    +            type="submit"
                                    +            class="btn btn--alert btn--full" >
                                    +            alert - full
                                    +        </button >
                                    +
                                    +        <button
                                    +            type="submit"
                                    +            class="btn btn--alert btn--outline btn--full" >
                                    +            alert - outline - full
                                    +        </button >
                                    +
                                    +    </article >
                                    +
                                    +    <article >
                                    +        <h2 >Forms element</h2 >
                                    +
                                    +        <h3 >Labels</h3 >
                                    +
                                    +        <label for="" >Un label pour les labelliser tous</label >
                                    +
                                    +        <h3 >Input name</h3 >
                                    +        <input
                                    +            type="name"
                                    +            name=""
                                    +            id="" ><br >
                                    +        <input
                                    +            type="name"
                                    +            name=""
                                    +            id=""
                                    +            value="texte" >
                                    +
                                    +        <h3 >Input email</h3 >
                                    +        <input
                                    +            type="email"
                                    +            name=""
                                    +            id="" ><br >
                                    +        <input
                                    +            type="email"
                                    +            name=""
                                    +            id=""
                                    +            value="adresse@email.com" >
                                    +
                                    +        <h3 >Input password</h3 >
                                    +        <input
                                    +            type="password"
                                    +            name=""
                                    +            id="" ><br >
                                    +        <input
                                    +            type="password"
                                    +            name=""
                                    +            id=""
                                    +            value="password" >
                                    +
                                    +        <h3 >Input date</h3 >
                                    +        <input
                                    +            type="date"
                                    +            name=""
                                    +            id="" ><br >
                                    +        <input
                                    +            type="date"
                                    +            name=""
                                    +            id=""
                                    +            value="1985-11-23" >
                                    +
                                    +        <h3 >Select</h3 >
                                    +        <select
                                    +            name=""
                                    +            id="" >
                                    +            <option value="" >
                                    +                1
                                    +            </option >
                                    +            <option value="" >
                                    +                2
                                    +            </option >
                                    +            <option value="" >
                                    +                3
                                    +            </option >
                                    +        </select >
                                    +
                                    +        <h3 >Textarea</h3 >
                                    +        <textarea
                                    +            name=""
                                    +            id=""
                                    +            cols="30"
                                    +            rows="10" ></textarea >
                                    +    </article >
                                    +
                                    +    <article >
                                    +        <h2 >Paragraphs</h2 >
                                    +
                                    +        <p >Lorem, ipsum dolor sit amet consectetur adipisicing elit. Magnam perspiciatis minus libero error dolores.
                                    +            Corrupti repellat vero repellendus reiciendis assumenda minus. Nobis, quaerat ut nihil minima sed animi
                                    +            delectus beatae!</p >
                                    +    </article >
                                    +
                                    +    <article >
                                    +        <h2 >Lists</h2 >
                                    +
                                    +        <h3 >Unordered list</h3 >
                                    +        <ul >
                                    +            <li >
                                    +                plop
                                    +            </li >
                                    +            <li >
                                    +                plop
                                    +            </li >
                                    +            <li >
                                    +                plop
                                    +            </li >
                                    +        </ul >
                                    +
                                    +        <h3 >Ordered list</h3 >
                                    +        <ol >
                                    +            <li >
                                    +                plop
                                    +            </li >
                                    +            <li >
                                    +                plop
                                    +            </li >
                                    +            <li >
                                    +                plop
                                    +            </li >
                                    +        </ol >
                                    +    </article >
                                    +
                                    +    <article >
                                    +        <h2 >Images</h2 >
                                    +        <img
                                    +            src="http://placekitten.com/200/300"
                                    +            alt="" >
                                    +    </article >
                                    +</section >
                                    +
                                    +<section >
                                    +    <h1 >Molecules</h1 >
                                    +    <framadate-voting-choice ></framadate-voting-choice >
                                    +    <article >
                                    +        <h2 >Useful classes</h2 >
                                    +
                                    +        <h3 >Align right</h3 >
                                    +        <div class="align-right" >
                                    +            <a
                                    +                [routerLink]="'/home'"
                                    +                class="next" >
                                    +                <span
                                    +                    class="text"
                                    +                    i18n >
                                    +                    C'est parti !
                                    +                </span >
                                    +            </a >
                                    +        </div >
                                    +    </article >
                                    +
                                    +    <article >
                                    +        <h2 >Label + input name</h2 >
                                    +        <label for="test-text" >Ceci est un label un peu long mais pas trop</label >
                                    +        <input
                                    +            type="name"
                                    +            name="test-text"
                                    +            id="test-text" >
                                    +    </article >
                                    +
                                    +    <article >
                                    +        <h2 >Label + select</h2 >
                                    +        <label for="test-select" >Ceci est un label un peu long mais pas trop</label >
                                    +        <select
                                    +            name="test-select"
                                    +            id="test-select" >
                                    +            <option value="" >
                                    +                1
                                    +            </option >
                                    +            <option value="" >
                                    +                2
                                    +            </option >
                                    +            <option value="" >
                                    +                3
                                    +            </option >
                                    +        </select >
                                    +    </article >
                                    +
                                    +    <article >
                                    +        <h2 >Input name with info</h2 >
                                    +        <a href="https://sketch.cloud/s/00A80/a/MAl5q7" >like here</a >
                                    +    </article >
                                    +
                                    +    <article >
                                    +        <h2 >Commentaries</h2 >
                                    +    </article >
                                    +</section >
                                    +
                                    +<section >
                                    +    <h1 >Components</h1 >
                                    +
                                    +    <article >
                                    +        <h2 >Images list</h2 >
                                    +        <a href="https://sketch.cloud/s/00A80/a/bQA9wj" >that</a >
                                    +    </article >
                                    +
                                    +    <article >
                                    +        <h2 >Calendar</h2 >
                                    +    </article >
                                    +
                                    +    <article >
                                    +        <h2 >Modale</h2 >
                                    +    </article >
                                    +
                                    +    <article >
                                    +        <h2 >Way to vote</h2 >
                                    +        <a href="https://sketch.cloud/s/00A80/a/Ol0598" >that</a >
                                    +    </article >
                                    +
                                    +    <article >
                                    +        <h2 >Voted</h2 >
                                    +        <a href="https://sketch.cloud/s/00A80/a/OlJZo2" >that</a >
                                    +    </article >
                                    +
                                    +    <article >
                                    +        <h2 >Graphics</h2 >
                                    +        <a href="https://sketch.cloud/s/00A80/a/megprw" >that</a >
                                    +    </article >
                                    +</section >
                                    +
                                    +
                                    + +
                                    +

                                    + ./kind.component.scss +

                                    +
                                    @charset "UTF-8";
                                    +
                                    +section {
                                    +    &:not(:last-of-type) {
                                    +        border-bottom: 6px solid #000;
                                    +    }
                                    +
                                    +    + section {
                                    +        margin: 0 !important;
                                    +    }
                                    +
                                    +}
                                    +
                                    +article {
                                    +    padding: 2rem 0;
                                    +    border-top: 3px solid #ffb92c;
                                    +
                                    +    h3 {
                                    +        &:not(:first-of-type) {
                                    +            margin-top: 2rem;
                                    +        }
                                    +    }
                                    +}
                                    +
                                    +
                                    + +
                                    +
                                    +
                                    +
                                    + Legend +
                                    +
                                    +
                                    Html element +
                                    +
                                    +
                                    Component +
                                    +
                                    +
                                    Html element with directive +
                                    +
                                    +
                                    + + +
                                    + + + + + + + + + + + + + + + + + + + + + +
                                    +
                                    +

                                    result-matching ""

                                    +
                                      +
                                      +
                                      +

                                      No results matching ""

                                      +
                                      +
                                      +
                                      + +
                                      +
                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/NavigationComponent.html b/documentation/components/NavigationComponent.html new file mode 100644 index 00000000..fe8f44a9 --- /dev/null +++ b/documentation/components/NavigationComponent.html @@ -0,0 +1,900 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                                      +
                                      + + +
                                      +
                                      + + + + + + + + +
                                      +

                                      +

                                      File

                                      +

                                      +

                                      + src/app/ui/navigation/navigation.component.ts +

                                      + + +

                                      +

                                      Extends

                                      +

                                      +

                                      + BaseComponent +

                                      + +

                                      +

                                      Implements

                                      +

                                      +

                                      + OnInit +

                                      + + +
                                      +

                                      Metadata

                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                      selectorframadate-navigation
                                      styleUrls./navigation.component.scss
                                      templateUrl./navigation.component.html
                                      +
                                      + +
                                      +

                                      Index

                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                      +
                                      Properties
                                      +
                                      + +
                                      +
                                      Methods
                                      +
                                      + +
                                      +
                                      Inputs
                                      +
                                      + +
                                      +
                                      + +
                                      +

                                      Constructor

                                      + + + + + + + + + + + + + +
                                      +constructor(config: ConfigService, route: Router) +
                                      + +
                                      +
                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                      NameTypeOptional
                                      config + ConfigService + + No +
                                      route + Router + + No +
                                      +
                                      +
                                      +
                                      + +
                                      +

                                      Inputs

                                      + + + + + + + + + + + + + + + +
                                      + + step +
                                      + Type : string + +
                                      + Default value : 'home' +
                                      + +
                                      +
                                      + + + +
                                      + +

                                      + Methods +

                                      + + + + + + + + + + + + + + + + + + + +
                                      + + + + nextPage + + + +
                                      +nextPage() +
                                      + +
                                      + +
                                      + Returns : void + +
                                      +
                                      + + + + + + + + + + + + + + + + + + + +
                                      + + + + ngOnInit + + + +
                                      +ngOnInit() +
                                      + +
                                      + +
                                      + Returns : void + +
                                      +
                                      + + + + + + + + + + + + + + + + + + + + + + +
                                      + + + + checkValidity + + + +
                                      +checkValidity() +
                                      +
                                      Inherited from BaseComponent +
                                      +
                                      +
                                      Defined in BaseComponent:21 +
                                      +
                                      + +
                                      + Returns : boolean + +
                                      +
                                      + + + + + + + + + + + + + + + + + + + + + + +
                                      + + + + displayErrorMessage + + + +
                                      +displayErrorMessage() +
                                      +
                                      Inherited from BaseComponent +
                                      +
                                      +
                                      Defined in BaseComponent:27 +
                                      +
                                      + +
                                      + Returns : boolean + +
                                      +
                                      + + + + + + + + + + + + + + + + + + + + + + +
                                      + + + + ngOnInit + + + +
                                      +ngOnInit() +
                                      +
                                      Inherited from BaseComponent +
                                      +
                                      +
                                      Defined in BaseComponent:17 +
                                      +
                                      + +
                                      + Returns : void + +
                                      +
                                      +
                                      +
                                      + +

                                      + Properties +

                                      + + + + + + + + + + + + + + +
                                      + + + + Public + config + + +
                                      + Type : ConfigService + +
                                      + +
                                      + + + + + + + + + + + + + + +
                                      + + + + Public + route + + +
                                      + Type : Router + +
                                      + +
                                      + + + + + + + + + + + + + + + + + +
                                      + + + + Public + config + + +
                                      + Type : ConfigService + +
                                      +
                                      Inherited from BaseComponent +
                                      +
                                      +
                                      Defined in BaseComponent:14 +
                                      +
                                      +
                                      + +
                                      + + +
                                      +
                                      import {Component, Input, OnInit} from '@angular/core';
                                      +import {BaseComponent} from '../../pages/base-page/base.component';
                                      +
                                      +import {Router} from '@angular/router';
                                      +import {ConfigService} from '../../services/config.service';
                                      +
                                      +@Component({
                                      +    selector: 'framadate-navigation',
                                      +    templateUrl: './navigation.component.html',
                                      +    styleUrls: ['./navigation.component.scss']
                                      +})
                                      +export class NavigationComponent extends BaseComponent implements OnInit {
                                      +
                                      +    @Input() public step: string = 'home';
                                      +
                                      +    constructor(public config: ConfigService,
                                      +                public route: Router) {
                                      +        super(config);
                                      +
                                      +    }
                                      +
                                      +    ngOnInit() {
                                      +
                                      +    }
                                      +
                                      +    nextPage() {
                                      +        if (this.checkValidity()) {
                                      +            if (this.config.step < this.config.stepMax) {
                                      +                this.config.step++;
                                      +            }
                                      +
                                      +        } else {
                                      +            this.displayErrorMessage();
                                      +        }
                                      +    }
                                      +}
                                      +
                                      +
                                      + +
                                      +
                                      <nav class="choices" >
                                      +    <a
                                      +        [routerLink]="'home'"
                                      +        [ngClass]="{'active': (step === 'home')}"
                                      +        i18n
                                      +    >
                                      +        <i class="fa fa-home" ></i >
                                      +    </a >
                                      +    <a
                                      +        [routerLink]="'/step/creation'"
                                      +        [ngClass]="{'active': step == 'creation'}"
                                      +        i18n
                                      +    >
                                      +        Création
                                      +    </a >
                                      +    <a
                                      +        [routerLink]="'/step/date'"
                                      +        [ngClass]="{'active': step == 'date'}"
                                      +        i18n
                                      +    >
                                      +        Les Dates
                                      +    </a >
                                      +    <a
                                      +        [routerLink]="'/step/answers'"
                                      +        [ngClass]="{'active': step == 'answers'}"
                                      +        i18
                                      +    >
                                      +        Réponses
                                      +    </a >
                                      +    <a
                                      +        [routerLink]="'/step/visibility'"
                                      +        [ngClass]="{'active': step == 'visibility'}"
                                      +        i18n
                                      +    >
                                      +        Visibilité
                                      +    </a >
                                      +    <a
                                      +        [routerLink]="'/step/base'"
                                      +        [ngClass]="{'active': step == 'base'}"
                                      +        i18n
                                      +    >
                                      +        Base
                                      +    </a >
                                      +    <a
                                      +        [routerLink]="'/step/pictures'"
                                      +        [ngClass]="{'active': step == 'pictures'}"
                                      +        i18n
                                      +    >
                                      +        Images
                                      +    </a >
                                      +    <a
                                      +        [routerLink]="'/step/resume'"
                                      +        [ngClass]="{'active': step == 'resume'}"
                                      +        i18n
                                      +    >
                                      +        Résumé
                                      +    </a >
                                      +    <a
                                      +        [routerLink]="'/step/end'"
                                      +        [ngClass]="{'active': step == 'end'}"
                                      +        i18n
                                      +    >
                                      +        Confirmation
                                      +    </a >
                                      +    <a
                                      +        [routerLink]="'/step/kind'"
                                      +        [ngClass]="{'active': step == 'kind'}"
                                      +        i18n
                                      +    >
                                      +        Page démo
                                      +    </a >
                                      +    <a
                                      +        [routerLink]="['vote/poll/id/',3]"
                                      +        i18n >
                                      +        Sondage dessins animés
                                      +    </a >
                                      +    <a
                                      +        [routerLink]="['vote/poll/id/',4]"
                                      +        i18n >
                                      +        Sondage 4
                                      +    </a >
                                      +    <a
                                      +        [routerLink]="'/vote/poll/id/5'"
                                      +        i18n >
                                      +        Sondage 5
                                      +    </a >
                                      +    <a
                                      +        [routerLink]="'/graphic/toto'"
                                      +        [ngClass]="{'active': step == 'graphic'}"
                                      +        i18n
                                      +    >
                                      +        Graphique
                                      +    </a >
                                      +    <a
                                      +        [routerLink]="'/step/admin'"
                                      +        i18n
                                      +    >
                                      +        Administration
                                      +    </a >
                                      +    <a
                                      +        [routerLink]="'/home'"
                                      +        i18n
                                      +    >
                                      +        Accueil
                                      +    </a >
                                      +</nav >
                                      +
                                      +
                                      + +
                                      +

                                      + ./navigation.component.scss +

                                      +
                                      @charset "UTF-8";
                                      +
                                      +nav {
                                      +    text-align: center;
                                      +    margin-bottom: 3.2rem;
                                      +    padding-top: 1.6rem;
                                      +    padding-bottom: 1.6rem;
                                      +    border-top: 2px solid #ffd52c;
                                      +    border-bottom: 2px solid #ffd52c;
                                      +
                                      +    a {
                                      +        &::before {
                                      +            display: inline-block;
                                      +            position: relative;
                                      +            width: auto;
                                      +            background: none;
                                      +        }
                                      +
                                      +        &::after {
                                      +            display: none;
                                      +        }
                                      +
                                      +        &:not(:first-of-type)::before {
                                      +            content: ' | ';
                                      +
                                      +        }
                                      +
                                      +        &.active {
                                      +            color: white;
                                      +            background: black;
                                      +        }
                                      +    }
                                      +}
                                      +
                                      +
                                      + +
                                      +
                                      +
                                      +
                                      + Legend +
                                      +
                                      +
                                      Html element +
                                      +
                                      +
                                      Component +
                                      +
                                      +
                                      Html element with directive +
                                      +
                                      +
                                      + + +
                                      + + + + + + + + + + + + + + + + + + + + + +
                                      +
                                      +

                                      result-matching ""

                                      +
                                        +
                                        +
                                        +

                                        No results matching ""

                                        +
                                        +
                                        +
                                        + +
                                        +
                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/PasswordComponent.html b/documentation/components/PasswordComponent.html new file mode 100644 index 00000000..0ac890cd --- /dev/null +++ b/documentation/components/PasswordComponent.html @@ -0,0 +1,640 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                                        +
                                        + + +
                                        +
                                        + + + + + + + + +
                                        +

                                        +

                                        File

                                        +

                                        +

                                        + src/app/pages/password/password.component.ts +

                                        + + +

                                        +

                                        Extends

                                        +

                                        +

                                        + BaseComponent +

                                        + +

                                        +

                                        Implements

                                        +

                                        +

                                        + OnInit +

                                        + + +
                                        +

                                        Metadata

                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                        selectorframadate-password
                                        styleUrls./password.component.scss
                                        templateUrl./password.component.html
                                        +
                                        + +
                                        +

                                        Index

                                        + + + + + + + + + + + + + + + + + + + + + +
                                        +
                                        Properties
                                        +
                                        + +
                                        +
                                        Methods
                                        +
                                        + +
                                        +
                                        + +
                                        +

                                        Constructor

                                        + + + + + + + + + + + + + +
                                        +constructor(config: ConfigService) +
                                        + +
                                        +
                                        + Parameters : + + + + + + + + + + + + + + + + + + +
                                        NameTypeOptional
                                        config + ConfigService + + No +
                                        +
                                        +
                                        +
                                        + + + + + +
                                        + +

                                        + Methods +

                                        + + + + + + + + + + + + + + + + + + + +
                                        + + + + ngOnInit + + + +
                                        +ngOnInit() +
                                        + +
                                        + +
                                        + Returns : void + +
                                        +
                                        + + + + + + + + + + + + + + + + + + + + + + +
                                        + + + + checkValidity + + + +
                                        +checkValidity() +
                                        +
                                        Inherited from BaseComponent +
                                        +
                                        +
                                        Defined in BaseComponent:21 +
                                        +
                                        + +
                                        + Returns : boolean + +
                                        +
                                        + + + + + + + + + + + + + + + + + + + + + + +
                                        + + + + displayErrorMessage + + + +
                                        +displayErrorMessage() +
                                        +
                                        Inherited from BaseComponent +
                                        +
                                        +
                                        Defined in BaseComponent:27 +
                                        +
                                        + +
                                        + Returns : boolean + +
                                        +
                                        + + + + + + + + + + + + + + + + + + + + + + +
                                        + + + + ngOnInit + + + +
                                        +ngOnInit() +
                                        +
                                        Inherited from BaseComponent +
                                        +
                                        +
                                        Defined in BaseComponent:17 +
                                        +
                                        + +
                                        + Returns : void + +
                                        +
                                        +
                                        +
                                        + +

                                        + Properties +

                                        + + + + + + + + + + + + + + +
                                        + + + + Public + config + + +
                                        + Type : ConfigService + +
                                        + +
                                        + + + + + + + + + + + + + + + + + +
                                        + + + + Public + config + + +
                                        + Type : ConfigService + +
                                        +
                                        Inherited from BaseComponent +
                                        +
                                        +
                                        Defined in BaseComponent:14 +
                                        +
                                        +
                                        + +
                                        + + +
                                        +
                                        import { Component, OnInit } from '@angular/core';
                                        +import {BaseComponent} from "../base-page/base.component";
                                        +import {ConfigService} from "../../services/config.service";
                                        +
                                        +@Component({
                                        +  selector: 'framadate-password',
                                        +  templateUrl: './password.component.html',
                                        +  styleUrls: ['./password.component.scss']
                                        +})
                                        +export class PasswordComponent extends BaseComponent implements OnInit {
                                        +
                                        +    constructor(public config: ConfigService) {
                                        +        super(config);
                                        +    }
                                        +
                                        +    ngOnInit() {
                                        +  }
                                        +
                                        +}
                                        +
                                        +
                                        + +
                                        +
                                        <h1 class="margin-btm-x3">Nom du sondage</h1>
                                        +<p class="margin-btm-x6">Ce sondage est protégé par un mot de passe</p>
                                        +
                                        +<form>
                                        +  <label for="password">Mot de passe :</label>
                                        +  <section class="row">
                                        +    <input class="margin-btm-x5" type="password" name="password">
                                        +    <input type="submit" name="view" value="Voir" class="btn btn--small btn--purple">
                                        +  </section>
                                        +
                                        +<input type="submit" name="go" value="Accéder au sondage" class="btn btn--primary btn--full btn--semi-bold">
                                        +</form>
                                        +
                                        +
                                        + +
                                        +

                                        + ./password.component.scss +

                                        +
                                        form{
                                        +  display:flex;
                                        +  flex-direction: column;
                                        +}
                                        +label{
                                        +  font-weight: 600;
                                        +  font-size: 18px;
                                        +}
                                        +h1{
                                        +  display:flex;
                                        +  align-self: center;
                                        +}
                                        +
                                        +
                                        + +
                                        +
                                        +
                                        +
                                        + Legend +
                                        +
                                        +
                                        Html element +
                                        +
                                        +
                                        Component +
                                        +
                                        +
                                        Html element with directive +
                                        +
                                        +
                                        + + +
                                        + + + + + + + + + + + + + + + + + + + + + +
                                        +
                                        +

                                        result-matching ""

                                        +
                                          +
                                          +
                                          +

                                          No results matching ""

                                          +
                                          +
                                          +
                                          + +
                                          +
                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/PicturesComponent.html b/documentation/components/PicturesComponent.html new file mode 100644 index 00000000..91316841 --- /dev/null +++ b/documentation/components/PicturesComponent.html @@ -0,0 +1,622 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                                          +
                                          + + +
                                          +
                                          + + + + + + + + +
                                          +

                                          +

                                          File

                                          +

                                          +

                                          + src/app/pages/pictures/pictures.component.ts +

                                          + + +

                                          +

                                          Extends

                                          +

                                          +

                                          + BaseComponent +

                                          + +

                                          +

                                          Implements

                                          +

                                          +

                                          + OnInit +

                                          + + +
                                          +

                                          Metadata

                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                          selectorframadate-pictures
                                          styleUrls./pictures.component.scss
                                          templateUrl./pictures.component.html
                                          +
                                          + +
                                          +

                                          Index

                                          + + + + + + + + + + + + + + + + + + + + + +
                                          +
                                          Properties
                                          +
                                          + +
                                          +
                                          Methods
                                          +
                                          + +
                                          +
                                          + +
                                          +

                                          Constructor

                                          + + + + + + + + + + + + + +
                                          +constructor(config: ConfigService) +
                                          + +
                                          +
                                          + Parameters : + + + + + + + + + + + + + + + + + + +
                                          NameTypeOptional
                                          config + ConfigService + + No +
                                          +
                                          +
                                          +
                                          + + + + + +
                                          + +

                                          + Methods +

                                          + + + + + + + + + + + + + + + + + + + +
                                          + + + + ngOnInit + + + +
                                          +ngOnInit() +
                                          + +
                                          + +
                                          + Returns : void + +
                                          +
                                          + + + + + + + + + + + + + + + + + + + + + + +
                                          + + + + checkValidity + + + +
                                          +checkValidity() +
                                          +
                                          Inherited from BaseComponent +
                                          +
                                          +
                                          Defined in BaseComponent:21 +
                                          +
                                          + +
                                          + Returns : boolean + +
                                          +
                                          + + + + + + + + + + + + + + + + + + + + + + +
                                          + + + + displayErrorMessage + + + +
                                          +displayErrorMessage() +
                                          +
                                          Inherited from BaseComponent +
                                          +
                                          +
                                          Defined in BaseComponent:27 +
                                          +
                                          + +
                                          + Returns : boolean + +
                                          +
                                          + + + + + + + + + + + + + + + + + + + + + + +
                                          + + + + ngOnInit + + + +
                                          +ngOnInit() +
                                          +
                                          Inherited from BaseComponent +
                                          +
                                          +
                                          Defined in BaseComponent:17 +
                                          +
                                          + +
                                          + Returns : void + +
                                          +
                                          +
                                          +
                                          + +

                                          + Properties +

                                          + + + + + + + + + + + + + + +
                                          + + + + Public + config + + +
                                          + Type : ConfigService + +
                                          + +
                                          + + + + + + + + + + + + + + + + + +
                                          + + + + Public + config + + +
                                          + Type : ConfigService + +
                                          +
                                          Inherited from BaseComponent +
                                          +
                                          +
                                          Defined in BaseComponent:14 +
                                          +
                                          +
                                          + +
                                          + + +
                                          +
                                          import {Component, OnInit} from '@angular/core';
                                          +import {ConfigService} from '../../services/config.service';
                                          +import {BaseComponent} from '../base-page/base.component';
                                          +
                                          +@Component({
                                          +    selector: 'framadate-pictures',
                                          +    templateUrl: './pictures.component.html',
                                          +    styleUrls: ['./pictures.component.scss']
                                          +})
                                          +export class PicturesComponent extends BaseComponent implements OnInit {
                                          +
                                          +    constructor(public config: ConfigService) {
                                          +        super(config);
                                          +    }
                                          +
                                          +    ngOnInit() {
                                          +    }
                                          +
                                          +}
                                          +
                                          +
                                          + +
                                          +
                                          <!--ceci est la popup pour ajouter une image-->
                                          +<h1 i18n>
                                          +	Images
                                          +</h1>
                                          +<a [routerLink]="'/step/visibility'" class="btn btn--primary">ok</a>
                                          +
                                          +
                                          +
                                          + +
                                          +

                                          + ./pictures.component.scss +

                                          +
                                          +
                                          + +
                                          +
                                          +
                                          +
                                          + Legend +
                                          +
                                          +
                                          Html element +
                                          +
                                          +
                                          Component +
                                          +
                                          +
                                          Html element with directive +
                                          +
                                          +
                                          + + +
                                          + + + + + + + + + + + + + + + + + + + + + +
                                          +
                                          +

                                          result-matching ""

                                          +
                                            +
                                            +
                                            +

                                            No results matching ""

                                            +
                                            +
                                            +
                                            + +
                                            +
                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/PollDisplayComponent.html b/documentation/components/PollDisplayComponent.html new file mode 100644 index 00000000..2e818503 --- /dev/null +++ b/documentation/components/PollDisplayComponent.html @@ -0,0 +1,875 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                                            +
                                            + + +
                                            +
                                            + + + + + + + + +
                                            +

                                            +

                                            File

                                            +

                                            +

                                            + src/app/pages/poll-display/poll-display.component.ts +

                                            + + +

                                            +

                                            Extends

                                            +

                                            +

                                            + BaseComponent +

                                            + +

                                            +

                                            Implements

                                            +

                                            +

                                            + OnInit +

                                            + + +
                                            +

                                            Metadata

                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                            selectorframadate-poll-display
                                            styleUrls./poll-display.component.scss
                                            templateUrl./poll-display.component.html
                                            +
                                            + +
                                            +

                                            Index

                                            + + + + + + + + + + + + + + + + + + + + + +
                                            +
                                            Properties
                                            +
                                            + +
                                            +
                                            Methods
                                            +
                                            + +
                                            +
                                            + +
                                            +

                                            Constructor

                                            + + + + + + + + + + + + + +
                                            +constructor(config: ConfigService, router: Router, activeRoute: ActivatedRoute) +
                                            + +
                                            +
                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                            NameTypeOptional
                                            config + ConfigService + + No +
                                            router + Router + + No +
                                            activeRoute + ActivatedRoute + + No +
                                            +
                                            +
                                            +
                                            + + + + + +
                                            + +

                                            + Methods +

                                            + + + + + + + + + + + + + + + + + + + +
                                            + + + + fetchPoll + + + +
                                            +fetchPoll() +
                                            + +
                                            + +
                                            + Returns : void + +
                                            +
                                            + + + + + + + + + + + + + + + + + + + +
                                            + + + + ngOnInit + + + +
                                            +ngOnInit() +
                                            + +
                                            + +
                                            + Returns : void + +
                                            +
                                            + + + + + + + + + + + + + + + + + + + + + + +
                                            + + + + checkValidity + + + +
                                            +checkValidity() +
                                            +
                                            Inherited from BaseComponent +
                                            +
                                            +
                                            Defined in BaseComponent:21 +
                                            +
                                            + +
                                            + Returns : boolean + +
                                            +
                                            + + + + + + + + + + + + + + + + + + + + + + +
                                            + + + + displayErrorMessage + + + +
                                            +displayErrorMessage() +
                                            +
                                            Inherited from BaseComponent +
                                            +
                                            +
                                            Defined in BaseComponent:27 +
                                            +
                                            + +
                                            + Returns : boolean + +
                                            +
                                            + + + + + + + + + + + + + + + + + + + + + + +
                                            + + + + ngOnInit + + + +
                                            +ngOnInit() +
                                            +
                                            Inherited from BaseComponent +
                                            +
                                            +
                                            Defined in BaseComponent:17 +
                                            +
                                            + +
                                            + Returns : void + +
                                            +
                                            +
                                            +
                                            + +

                                            + Properties +

                                            + + + + + + + + + + + + + + +
                                            + + + + Public + activeRoute + + +
                                            + Type : ActivatedRoute + +
                                            + +
                                            + + + + + + + + + + + + + + +
                                            + + + + comments + + +
                                            + Default value : mockComments +
                                            + +
                                            + + + + + + + + + + + + + + +
                                            + + + + Public + config + + +
                                            + Type : ConfigService + +
                                            + +
                                            + + + + + + + + + + + + + + + + + +
                                            + + + + Public + config + + +
                                            + Type : ConfigService + +
                                            +
                                            Inherited from BaseComponent +
                                            +
                                            +
                                            Defined in BaseComponent:14 +
                                            +
                                            +
                                            + +
                                            + + +
                                            +
                                            import {Component, OnInit} from '@angular/core';
                                            +import {BaseComponent} from "../base-page/base.component";
                                            +import {ConfigService} from "../../services/config.service";
                                            +import {mockComments} from "../../config/mocks/mock-comments";
                                            +import {ActivatedRoute, Router} from "@angular/router";
                                            +import {environment} from "../../../environments/environment";
                                            +import {mockPoll3} from "../../config/mocks/mock-poll3";
                                            +
                                            +@Component({
                                            +    selector: 'framadate-poll-display',
                                            +    templateUrl: './poll-display.component.html',
                                            +    styleUrls: ['./poll-display.component.scss']
                                            +})
                                            +export class PollDisplayComponent extends BaseComponent implements OnInit {
                                            +
                                            +    comments = mockComments;
                                            +
                                            +    constructor(public config: ConfigService,
                                            +                private router: Router,
                                            +                public activeRoute: ActivatedRoute) {
                                            +        super(config);
                                            +        this.activeRoute.paramMap.subscribe(params => {
                                            +            console.log('params', params);
                                            +            this.config.pollId = params.get('poll');
                                            +            this.config.pollSlug = params.get('pollSlug');
                                            +            if (!this.config.loading) {
                                            +                this.fetchPoll();
                                            +            }
                                            +        });
                                            +    }
                                            +
                                            +    ngOnInit() {
                                            +
                                            +    }
                                            +
                                            +
                                            +    // fetch poll with its ID or slug.
                                            +    fetchPoll() {
                                            +        const id = this.activeRoute.snapshot.params.poll;
                                            +        const pollSlug = this.activeRoute.snapshot.params.pollSlug;
                                            +
                                            +        if (!environment.production) {
                                            +            console.log('mockPoll3', mockPoll3);
                                            +            this.config.currentPoll = mockPoll3;
                                            +            return;
                                            +        }
                                            +        if (id) {
                                            +            this.config.loading = true;
                                            +            // store it in the poll property here
                                            +            this.config.getPollById(id).subscribe(
                                            +                (res: any) => {
                                            +                    console.log('res', res);
                                            +                    this.config.updateCurrentPollFromResponse(res);
                                            +                    this.config.loading = false;
                                            +                }, (e) => {
                                            +                    // handle need for a password
                                            +                    console.log('e', e);
                                            +                    this.config.handleError(e)
                                            +                }
                                            +            );
                                            +        } else if (pollSlug) {
                                            +            this.config.loading = true;
                                            +            this.config.getPollByURL(pollSlug).subscribe(
                                            +                (res: any) => {
                                            +                    this.config.loading = false;
                                            +                    this.config.updateCurrentPollFromResponse(res);
                                            +                }, (e) => {
                                            +                    // handle need for a password
                                            +                    this.config.handleError(e)
                                            +                }
                                            +            );
                                            +        }
                                            +
                                            +    }
                                            +
                                            +}
                                            +
                                            +
                                            + +
                                            +
                                            <div
                                            +    class="poll"
                                            +>
                                            +    <div
                                            +        class='loading'
                                            +        *ngIf='config.loading' >
                                            +        <i class='fa fa-refresh fa-spin' ></i >
                                            +    </div >
                                            +    <div
                                            +        class='loaded-poll'
                                            +        *ngIf='!config.loading && config.currentPoll' >
                                            +
                                            +        <div id='choices' >
                                            +
                                            +            <framadate-choices-list ></framadate-choices-list >
                                            +        </div >
                                            +        <div id='table' >
                                            +            <!--        <framadate-voting-navigation ></framadate-voting-navigation >-->
                                            +            <framadate-voting-summary ></framadate-voting-summary >
                                            +        </div >
                                            +        <div id='poll_comments' >
                                            +            <framadate-comments-list ></framadate-comments-list >
                                            +        </div >
                                            +        <div id='graph' >
                                            +            <!--<framadate-voting-graph ></framadate-voting-graph >-->
                                            +        </div >
                                            +        <div id='export_and_share' >
                                            +
                                            +            <div
                                            +                class="sharing"
                                            +                *ngIf='config.currentPoll' >
                                            +                <h3 class="margin-top-x8" >Partager le sondage
                                            +
                                            +                    <i class='fa fa-share' ></i ></h3 >
                                            +                <p
                                            +                    class="nobold text-14"
                                            +                    for="copyLink" >Pour partager le sondage, vous pouvez diffuser ce lien :
                                            +                    <a href='{{config.currentPoll.urlPublic}}' >
                                            +                        {{config.currentPoll.urlPublic}}
                                            +                    </a >
                                            +                </p >
                                            +
                                            +                <framadate-copy-text [textToCopy]='config.currentPoll.urlPublic' ></framadate-copy-text >
                                            +                <h3 class="margin-top-x6 margin-btm-x3" >
                                            +                    Exporter/Imprimer
                                            +                </h3 >
                                            +                <input
                                            +                    type="submit"
                                            +                    name="export"
                                            +                    class="margin-btm-x3 btn btn--primary btn--outline"
                                            +                    value="Exporter en .csv"
                                            +                    (click)="config.exportCSV()" >
                                            +                <input
                                            +                    type="submit"
                                            +                    name="copy-link"
                                            +                    class="btn btn--primary btn--outline"
                                            +                    value="Imprimer le sondage"
                                            +                    (click)="config.print()" >
                                            +            </div >
                                            +
                                            +        </div >
                                            +    </div >
                                            +    <div
                                            +        class='badly-loaded'
                                            +        *ngIf='config.loading && !config.currentPoll' >
                                            +        <div class='well is-warning' >
                                            +
                                            +            No current poll available
                                            +        </div >
                                            +    </div >
                                            +
                                            +</div >
                                            +
                                            +
                                            + +
                                            +

                                            + ./poll-display.component.scss +

                                            +
                                            @import "../../../assets/scss/variables";
                                            +
                                            +
                                            +
                                            +
                                            + +
                                            +
                                            +
                                            +
                                            + Legend +
                                            +
                                            +
                                            Html element +
                                            +
                                            +
                                            Component +
                                            +
                                            +
                                            Html element with directive +
                                            +
                                            +
                                            + + +
                                            + + + + + + + + + + + + + + + + + + + + + +
                                            +
                                            +

                                            result-matching ""

                                            +
                                              +
                                              +
                                              +

                                              No results matching ""

                                              +
                                              +
                                              +
                                              + +
                                              +
                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/PollGraphicComponent.html b/documentation/components/PollGraphicComponent.html new file mode 100644 index 00000000..dbec134d --- /dev/null +++ b/documentation/components/PollGraphicComponent.html @@ -0,0 +1,979 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                                              +
                                              + + +
                                              +
                                              + + + + + + + + +
                                              +

                                              +

                                              File

                                              +

                                              +

                                              + src/app/poll-graphic/poll-graphic.component.ts +

                                              + + + +

                                              +

                                              Implements

                                              +

                                              +

                                              + OnInit +

                                              + + +
                                              +

                                              Metadata

                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                              selectorframadate-poll-graphic
                                              styleUrls./poll-graphic.component.scss
                                              templateUrl./poll-graphic.component.html
                                              +
                                              + +
                                              +

                                              Index

                                              + + + + + + + + + + + + + + + + + + + + + +
                                              +
                                              Properties
                                              +
                                              + +
                                              +
                                              Methods
                                              +
                                              + +
                                              +
                                              + +
                                              +

                                              Constructor

                                              + + + + + + + + + + + + + +
                                              +constructor(document: any, config: ConfigService) +
                                              + +
                                              +
                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                              NameTypeOptional
                                              document + any + + No +
                                              config + ConfigService + + No +
                                              +
                                              +
                                              +
                                              + + + + + +
                                              + +

                                              + Methods +

                                              + + + + + + + + + + + + + + + + + + + +
                                              + + + + formatDataAnswers + + + +
                                              +formatDataAnswers(poll) +
                                              + +
                                              + +
                                              + Parameters : + + + + + + + + + + + + + + + + +
                                              NameOptional
                                              poll + No +
                                              +
                                              +
                                              +
                                              +
                                              + Returns : void + +
                                              +
                                              + +
                                              +
                                              + + + + + + + + + + + + + + + + + + + +
                                              + + + + initPollCounter + + + +
                                              +initPollCounter() +
                                              + +
                                              + +
                                              + Returns : void + +
                                              +
                                              + + + + + + + + + + + + + + + + + + + +
                                              + + + + ngOnInit + + + +
                                              +ngOnInit() +
                                              + +
                                              + +
                                              + Returns : void + +
                                              +
                                              + + + + + + + + + + + + + + + + + + + +
                                              + + + + toggleColorblind + + + +
                                              +toggleColorblind() +
                                              + +
                                              + +
                                              + Returns : void + +
                                              +
                                              +
                                              +
                                              + +

                                              + Properties +

                                              + + + + + + + + + + + + + + + + + +
                                              + + + + dateList + + +
                                              + Type : string[] + +
                                              + Default value : [] +
                                              + +
                                              + + + + + + + + + + + + + + + + + +
                                              + + + + graphicConfig + + +
                                              + Type : any + +
                                              + Default value : mockGraphConfig +
                                              + +
                                              + + + + + + + + + + + + + + + + + +
                                              + + + + isColorblind + + +
                                              + Type : boolean + +
                                              + Default value : false +
                                              + +
                                              + + + + + + + + + + + + + + + + + +
                                              + + + + maybeList + + +
                                              + Type : number[] + +
                                              + Default value : [] +
                                              + +
                                              + + + + + + + + + + + + + + + + + +
                                              + + + + nbPoll + + +
                                              + Type : number + +
                                              + Default value : 0 +
                                              + +
                                              + + + + + + + + + + + + + + + + + +
                                              + + + + noList + + +
                                              + Type : number[] + +
                                              + Default value : [] +
                                              + +
                                              + + + + + + + + + + + + + + + + + +
                                              + + + + pollConfigRetrieved + + +
                                              + Type : any + +
                                              + Default value : mockPoll3 +
                                              + +
                                              + + + + + + + + + + + + + + + + + +
                                              + + + + preferred + + +
                                              + Type : any + +
                                              + Default value : "rien" +
                                              + +
                                              + + + + + + + + + + + + + + + + + +
                                              + + + + yesList + + +
                                              + Type : number[] + +
                                              + Default value : [] +
                                              + +
                                              +
                                              + +
                                              + + +
                                              +
                                              import {Component, Inject, OnInit} from "@angular/core";
                                              +import {Chart} from "chart.js";
                                              +import {DOCUMENT} from '@angular/common';
                                              +import {mockGraphConfig} from "../config/mocks/mock-graph";
                                              +import {graphOptions} from "../config/graph-canevas-options";
                                              +import {ConfigService} from "../services/config.service";
                                              +import {mockPoll3} from "../config/mocks/mock-poll3";
                                              +
                                              +@Component({
                                              +    selector: "framadate-poll-graphic",
                                              +    templateUrl: "./poll-graphic.component.html",
                                              +    styleUrls: ["./poll-graphic.component.scss"]
                                              +})
                                              +export class PollGraphicComponent implements OnInit {
                                              +    isColorblind: boolean = false;
                                              +    pollConfigRetrieved: any = mockPoll3;
                                              +    graphicConfig: any = mockGraphConfig;
                                              +    preferred: any = "rien";
                                              +    yesList: number[] = [];
                                              +    maybeList: number[] = [];
                                              +    noList: number[] = [];
                                              +    nbPoll: number = 0;
                                              +    dateList: string[] = [];
                                              +
                                              +    constructor(@Inject(DOCUMENT) private document: any,
                                              +                private config: ConfigService) {
                                              +    }
                                              +
                                              +    ngOnInit() {
                                              +        this.formatDataAnswers(this.graphicConfig);
                                              +        this.isColorblind = false;
                                              +        this.pollConfigRetrieved = new Chart(this.document.getElementById("graph"), {
                                              +            type: "horizontalBar",
                                              +            data: {
                                              +                labels: this.pollConfigRetrieved.choices.map(choice => choice.name),
                                              +                datasets: [
                                              +                    {
                                              +                        type: "horizontalBar",
                                              +                        stack: "Yes",
                                              +                        backgroundColor: "#429a00",
                                              +                        data: this.yesList
                                              +                    },
                                              +                    {
                                              +                        type: "horizontalBar",
                                              +                        stack: "Yes",
                                              +                        backgroundColor: "#f5a623",
                                              +                        data: this.maybeList
                                              +                    },
                                              +                    {
                                              +                        type: "horizontalBar",
                                              +                        stack: "No",
                                              +                        backgroundColor: "#cd0000",
                                              +                        data: this.noList
                                              +                    }
                                              +                ]
                                              +            },
                                              +            options: graphOptions
                                              +        });
                                              +    }
                                              +
                                              +    toggleColorblind() {
                                              +        this.isColorblind = !this.isColorblind;
                                              +    }
                                              +
                                              +    formatDataAnswers(poll) {
                                              +        // if (poll && poll.pollType === "date") {
                                              +        this.initPollCounter();
                                              +        poll.answers.forEach(response => {
                                              +            switch (response.text) {
                                              +                case "yes":
                                              +                    this.yesList[this.nbPoll - 1]++;
                                              +                    break;
                                              +                case "maybe":
                                              +                    this.maybeList[this.nbPoll - 1]++;
                                              +                    break;
                                              +                case "no":
                                              +                    this.noList[this.nbPoll - 1]++;
                                              +                    break;
                                              +            }
                                              +        });
                                              +        // }
                                              +    }
                                              +
                                              +    initPollCounter() {
                                              +        this.nbPoll++;
                                              +        this.dateList[this.nbPoll - 1] = "jeudi";
                                              +        this.maybeList[this.nbPoll - 1] = 0;
                                              +        this.yesList[this.nbPoll - 1] = 0;
                                              +        this.noList[this.nbPoll - 1] = 0;
                                              +    }
                                              +}
                                              +
                                              +
                                              + +
                                              +
                                              <select
                                              +    id="selectColorblind"
                                              +    name="selector"
                                              +    autofocus="autofocus"
                                              +    [(ngModel)]="isColorblind"
                                              +    (change)="toggleColorblind()"
                                              +    class="input"
                                              +>
                                              +    <option value="true" >
                                              +        {{ "pollGraphic.choiceColorblind" | translate }}
                                              +    </option >
                                              +    <option value="false" >
                                              +        {{ "pollGraphic.choiceNotColorblind" | translate }}
                                              +    </option >
                                              +</select >
                                              +<span class="colorblind" >
                                              +{{ "pollGraphic.colorblindText" | translate }}
                                              +</span >
                                              +<div class='well' >
                                              +    work in progress to link data with poll config
                                              +</div >
                                              +<div >
                                              +    <canvas
                                              +        id="graph"
                                              +        width="100%"
                                              +        height="15em" ></canvas >
                                              +</div >
                                              +
                                              +
                                              +
                                              +
                                              + +
                                              +

                                              + ./poll-graphic.component.scss +

                                              +
                                              #selectColorblind {
                                              +    direction: rtl;
                                              +}
                                              +
                                              +
                                              + +
                                              +
                                              +
                                              +
                                              + Legend +
                                              +
                                              +
                                              Html element +
                                              +
                                              +
                                              Component +
                                              +
                                              +
                                              Html element with directive +
                                              +
                                              +
                                              + + +
                                              + + + + + + + + + + + + + + + + + + + + + +
                                              +
                                              +

                                              result-matching ""

                                              +
                                                +
                                                +
                                                +

                                                No results matching ""

                                                +
                                                +
                                                +
                                                + +
                                                +
                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ResumeComponent.html b/documentation/components/ResumeComponent.html new file mode 100644 index 00000000..5b42a7f6 --- /dev/null +++ b/documentation/components/ResumeComponent.html @@ -0,0 +1,701 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                                                +
                                                + + +
                                                +
                                                + + + + + + + + +
                                                +

                                                +

                                                File

                                                +

                                                +

                                                + src/app/pages/resume/resume.component.ts +

                                                + + +

                                                +

                                                Extends

                                                +

                                                +

                                                + BaseComponent +

                                                + + + +
                                                +

                                                Metadata

                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                selectorframadate-resume
                                                styleUrls./resume.component.scss
                                                templateUrl./resume.component.html
                                                +
                                                + +
                                                +

                                                Index

                                                + + + + + + + + + + + + + + + + + + + + + +
                                                +
                                                Properties
                                                +
                                                + +
                                                +
                                                Methods
                                                +
                                                + +
                                                +
                                                + +
                                                +

                                                Constructor

                                                + + + + + + + + + + + + + +
                                                +constructor(config: ConfigService, router: Router) +
                                                + +
                                                +
                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                NameTypeOptional
                                                config + ConfigService + + No +
                                                router + Router + + No +
                                                +
                                                +
                                                +
                                                + + + + + +
                                                + +

                                                + Methods +

                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                + + + + checkValidity + + + +
                                                +checkValidity() +
                                                +
                                                Inherited from BaseComponent +
                                                +
                                                +
                                                Defined in BaseComponent:21 +
                                                +
                                                + +
                                                + Returns : boolean + +
                                                +
                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                + + + + displayErrorMessage + + + +
                                                +displayErrorMessage() +
                                                +
                                                Inherited from BaseComponent +
                                                +
                                                +
                                                Defined in BaseComponent:27 +
                                                +
                                                + +
                                                + Returns : boolean + +
                                                +
                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                + + + + ngOnInit + + + +
                                                +ngOnInit() +
                                                +
                                                Inherited from BaseComponent +
                                                +
                                                +
                                                Defined in BaseComponent:17 +
                                                +
                                                + +
                                                + Returns : void + +
                                                +
                                                +
                                                +
                                                + +

                                                + Properties +

                                                + + + + + + + + + + + + + + +
                                                + + + + Public + config + + +
                                                + Type : ConfigService + +
                                                + +
                                                + + + + + + + + + + + + + + + + + +
                                                + + + + Public + config + + +
                                                + Type : ConfigService + +
                                                +
                                                Inherited from BaseComponent +
                                                +
                                                +
                                                Defined in BaseComponent:14 +
                                                +
                                                +
                                                + +
                                                + + +
                                                +
                                                import {Component} from '@angular/core';
                                                +import {BaseComponent} from '../base-page/base.component';
                                                +import {ConfigService} from '../../services/config.service';
                                                +import {Router} from "@angular/router";
                                                +
                                                +@Component({
                                                +    selector: 'framadate-resume',
                                                +    templateUrl: './resume.component.html',
                                                +    styleUrls: ['./resume.component.scss']
                                                +})
                                                +export class ResumeComponent extends BaseComponent {
                                                +
                                                +    constructor(public config: ConfigService,
                                                +                private router: Router) {
                                                +        super(config);
                                                +    }
                                                +
                                                +}
                                                +
                                                +
                                                + +
                                                +
                                                <h1 >
                                                +    Récapitulatif
                                                +</h1 >
                                                +<div class='card content' >
                                                +
                                                +    <h2 class="hero-title title" >
                                                +        {{config.title}}
                                                +    </h2 >
                                                +    <div class="creation" >
                                                +        créé par
                                                +        <i class='pseudo' >
                                                +            {{config.myName}}
                                                +        </i >
                                                +    </div >
                                                +    <div class="description" >
                                                +        <cite >
                                                +            {{config.description}}
                                                +        </cite >
                                                +    </div >
                                                +    <section
                                                +        class='preview type-classic'
                                                +        *ngIf='config.pollType == "classic"' >
                                                +        <ul >
                                                +            <li
                                                +                markdown
                                                +                *ngFor="let questions of config.answers" >
                                                +                <img
                                                +                    class='img-thumbnail'
                                                +                    src='{{questions.url}}'
                                                +                    alt='image {{questions.url}}' >
                                                +                {{questions.id + 1}}. {{questions.text}}
                                                +            </li >
                                                +        </ul >
                                                +    </section >
                                                +    <section
                                                +        class='type-date'
                                                +        *ngIf='config.pollType !== "classic"' >
                                                +        <i class='fa fa-clock-o' ></i >
                                                +        <span
                                                +            class='well'
                                                +            *ngIf="'true' === config.allowSeveralHours" >
                                                +            {{"dates.multiple.different"|translate}}
                                                +        </span >
                                                +        <span
                                                +            class='well'
                                                +            *ngIf="'false' === config.allowSeveralHours" >
                                                +            {{"dates.multiple.identical"|translate}}
                                                +        </span >
                                                +        <div
                                                +            *ngFor="let choice of config.dateList; index as id"
                                                +            class="date-choice"
                                                +        >
                                                +            <div
                                                +                class='only-one-slice'
                                                +                *ngIf='!choice.timeList.length' >
                                                +                <i class='fa fa-square-o' ></i >
                                                +            </div >
                                                +            {{choice.literal}}
                                                +
                                                +            <!-- CASE different slices of the day-->
                                                +            <div
                                                +                *ngIf="'true' === config.allowSeveralHours"
                                                +                class="several-times"
                                                +            >
                                                +
                                                +                <div
                                                +                    *ngFor="let time of choice.timeList ; index as idTime"
                                                +                    class="time-choice"
                                                +                >
                                                +                    {{idTime}})
                                                +                    <i class='fa fa-square-o' ></i >
                                                +                    {{time.literal}}
                                                +                </div >
                                                +
                                                +            </div >
                                                +            <!-- CASE all dates having the same slices of the day-->
                                                +            <div
                                                +                *ngIf="'false' === config.allowSeveralHours"
                                                +                class="same-times"
                                                +            >
                                                +                <div
                                                +                    *ngFor="let time of config.timeList "
                                                +                    class="time-choice"
                                                +                >
                                                +                    <i class='fa fa-square-o' ></i >
                                                +                    {{time.literal}}
                                                +                </div >
                                                +            </div >
                                                +        </div >
                                                +    </section >
                                                +
                                                +</div >
                                                +
                                                +<button
                                                +    [routerLink]="'/step/visibility'"
                                                +    class="btn btn--primary btn--full" >
                                                +    C'est parfait!
                                                +</button >
                                                +
                                                +<div class="back" >
                                                +    <a
                                                +        *ngIf='config.pollType == "classic"'
                                                +        [routerLink]="'/step/answers'"
                                                +        class="prev" >
                                                +        Retour
                                                +    </a >
                                                +    <a
                                                +        *ngIf='config.pollType == "dates"'
                                                +        [routerLink]="'/step/date'"
                                                +        class="prev" >
                                                +        Retour
                                                +    </a >
                                                +</div >
                                                +
                                                +
                                                + +
                                                +

                                                + ./resume.component.scss +

                                                +
                                                .card {
                                                +    box-shadow: 0px 0px 0.5em #ccc;
                                                +    padding: 2em;
                                                +    margin: 1em 0;
                                                +}
                                                +
                                                +.time-choice {
                                                +    margin-left: 3em;
                                                +}
                                                +
                                                +
                                                + +
                                                +
                                                +
                                                +
                                                + Legend +
                                                +
                                                +
                                                Html element +
                                                +
                                                +
                                                Component +
                                                +
                                                +
                                                Html element with directive +
                                                +
                                                +
                                                + + +
                                                + + + + + + + + + + + + + + + + + + + + + +
                                                +
                                                +

                                                result-matching ""

                                                +
                                                  +
                                                  +
                                                  +

                                                  No results matching ""

                                                  +
                                                  +
                                                  +
                                                  + +
                                                  +
                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/SelectorComponent.html b/documentation/components/SelectorComponent.html new file mode 100644 index 00000000..585640f6 --- /dev/null +++ b/documentation/components/SelectorComponent.html @@ -0,0 +1,405 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                                                  +
                                                  + + +
                                                  +
                                                  + + + + + + + + +
                                                  +

                                                  +

                                                  File

                                                  +

                                                  +

                                                  + src/app/ui/selector/selector.component.ts +

                                                  + + + +

                                                  +

                                                  Implements

                                                  +

                                                  +

                                                  + OnInit +

                                                  + + +
                                                  +

                                                  Metadata

                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                  selectorframadate-selector
                                                  styleUrls./selector.component.scss
                                                  templateUrl./selector.component.html
                                                  +
                                                  + +
                                                  +

                                                  Index

                                                  + + + + + + + + + + + + + + + + + + + + + +
                                                  +
                                                  Methods
                                                  +
                                                  + +
                                                  +
                                                  Inputs
                                                  +
                                                  + +
                                                  +
                                                  + +
                                                  +

                                                  Constructor

                                                  + + + + + + + + + + +
                                                  +constructor() +
                                                  + +
                                                  +
                                                  + +
                                                  +

                                                  Inputs

                                                  + + + + + + + + + + + + +
                                                  + + selectorConfig +
                                                  + Type : SelectorConfig + +
                                                  + +
                                                  +
                                                  + + + +
                                                  + +

                                                  + Methods +

                                                  + + + + + + + + + + + + + + + + + + + +
                                                  + + + + ngOnInit + + + +
                                                  +ngOnInit() +
                                                  + +
                                                  + +
                                                  + Returns : void + +
                                                  +
                                                  +
                                                  + +
                                                  + + +
                                                  +
                                                  import {Component, Input, OnInit} from '@angular/core';
                                                  +
                                                  +interface Item {
                                                  +    label: string,
                                                  +    value: string
                                                  +}
                                                  +
                                                  +interface SelectorConfig {
                                                  +    label: string,
                                                  +    name: string,
                                                  +    id: string,
                                                  +    selectorNgModel: any,
                                                  +    listItems: Item[]
                                                  +}
                                                  +
                                                  +@Component({
                                                  +    selector: 'framadate-selector',
                                                  +    templateUrl: './selector.component.html',
                                                  +    styleUrls: ['./selector.component.scss']
                                                  +})
                                                  +export class SelectorComponent implements OnInit {
                                                  +    @Input() selectorConfig: SelectorConfig;
                                                  +
                                                  +    constructor() {
                                                  +    }
                                                  +
                                                  +    ngOnInit() {
                                                  +    }
                                                  +
                                                  +}
                                                  +
                                                  +
                                                  + +
                                                  +
                                                  <select
                                                  +    class="custom-selector"
                                                  +    name="{{selectorConfig.name}}"
                                                  +    id="{{selectorConfig.id}}"
                                                  +    [(ngModel)]="selectorConfig.selectorNgModel">
                                                  +    <option value="{{item.value}}" selected *ngFor="let item of selectorConfig.listItems">
                                                  +        {{item.label}}
                                                  +    </option>
                                                  +</select>
                                                  +
                                                  +
                                                  + +
                                                  +

                                                  + ./selector.component.scss +

                                                  +
                                                  +
                                                  + +
                                                  +
                                                  +
                                                  +
                                                  + Legend +
                                                  +
                                                  +
                                                  Html element +
                                                  +
                                                  +
                                                  Component +
                                                  +
                                                  +
                                                  Html element with directive +
                                                  +
                                                  +
                                                  + + +
                                                  + + + + + + + + + + + + + + + + + + + + + +
                                                  +
                                                  +

                                                  result-matching ""

                                                  +
                                                    +
                                                    +
                                                    +

                                                    No results matching ""

                                                    +
                                                    +
                                                    +
                                                    + +
                                                    +
                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/VisibilityComponent.html b/documentation/components/VisibilityComponent.html new file mode 100644 index 00000000..3936022d --- /dev/null +++ b/documentation/components/VisibilityComponent.html @@ -0,0 +1,997 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                                                    +
                                                    + + +
                                                    +
                                                    + + + + + + + + +
                                                    +

                                                    +

                                                    File

                                                    +

                                                    +

                                                    + src/app/pages/visibility/visibility.component.ts +

                                                    + + +

                                                    +

                                                    Extends

                                                    +

                                                    +

                                                    + BaseComponent +

                                                    + +

                                                    +

                                                    Implements

                                                    +

                                                    +

                                                    + OnInit +

                                                    + + +
                                                    +

                                                    Metadata

                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                    selectorframadate-visibility
                                                    styleUrls./visibility.component.scss
                                                    templateUrl./visibility.component.html
                                                    +
                                                    + +
                                                    +

                                                    Index

                                                    + + + + + + + + + + + + + + + + + + + + + +
                                                    +
                                                    Properties
                                                    +
                                                    + +
                                                    +
                                                    Methods
                                                    +
                                                    + +
                                                    +
                                                    + +
                                                    +

                                                    Constructor

                                                    + + + + + + + + + + + + + +
                                                    +constructor(config: ConfigService, utils: PollUtilities) +
                                                    + +
                                                    +
                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                    NameTypeOptional
                                                    config + ConfigService + + No +
                                                    utils + PollUtilities + + No +
                                                    +
                                                    +
                                                    +
                                                    + + + + + +
                                                    + +

                                                    + Methods +

                                                    + + + + + + + + + + + + + + + + + + + +
                                                    + + + + ngOnInit + + + +
                                                    +ngOnInit() +
                                                    + +
                                                    + +
                                                    + Returns : void + +
                                                    +
                                                    + + + + + + + + + + + + + + + + + + + +
                                                    + + + + submitCreationAndGoToEnd + + + +
                                                    +submitCreationAndGoToEnd() +
                                                    + +
                                                    + +
                                                    + Returns : void + +
                                                    +
                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                    + + + + checkValidity + + + +
                                                    +checkValidity() +
                                                    +
                                                    Inherited from BaseComponent +
                                                    +
                                                    +
                                                    Defined in BaseComponent:21 +
                                                    +
                                                    + +
                                                    + Returns : boolean + +
                                                    +
                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                    + + + + displayErrorMessage + + + +
                                                    +displayErrorMessage() +
                                                    +
                                                    Inherited from BaseComponent +
                                                    +
                                                    +
                                                    Defined in BaseComponent:27 +
                                                    +
                                                    + +
                                                    + Returns : boolean + +
                                                    +
                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                    + + + + ngOnInit + + + +
                                                    +ngOnInit() +
                                                    +
                                                    Inherited from BaseComponent +
                                                    +
                                                    +
                                                    Defined in BaseComponent:17 +
                                                    +
                                                    + +
                                                    + Returns : void + +
                                                    +
                                                    +
                                                    +
                                                    + +

                                                    + Properties +

                                                    + + + + + + + + + + + + + + +
                                                    + + + + baseUrl + + +
                                                    + Default value : environment.baseApiHref +
                                                    + +
                                                    + + + + + + + + + + + + + + +
                                                    + + + + Public + config + + +
                                                    + Type : ConfigService + +
                                                    + +
                                                    + + + + + + + + + + + + + + +
                                                    + + + + environment + + +
                                                    + Default value : environment +
                                                    + +
                                                    + + + + + + + + + + + + + + +
                                                    + + + + showCustomPassword + + +
                                                    + Default value : false +
                                                    + +
                                                    + + + + + + + + + + + + + + +
                                                    + + + + Public + utils + + +
                                                    + Type : PollUtilities + +
                                                    + +
                                                    + + + + + + + + + + + + + + + + + +
                                                    + + + + Public + config + + +
                                                    + Type : ConfigService + +
                                                    +
                                                    Inherited from BaseComponent +
                                                    +
                                                    +
                                                    Defined in BaseComponent:14 +
                                                    +
                                                    +
                                                    + +
                                                    + + +
                                                    +
                                                    import {Component, OnInit} from '@angular/core';
                                                    +import {BaseComponent} from '../base-page/base.component';
                                                    +import {ConfigService} from '../../services/config.service';
                                                    +import {environment} from "../../../environments/environment";
                                                    +import {PollUtilities} from "../../config/PollUtilities";
                                                    +
                                                    +@Component({
                                                    +    selector: 'framadate-visibility',
                                                    +    templateUrl: './visibility.component.html',
                                                    +    styleUrls: ['./visibility.component.scss']
                                                    +})
                                                    +export class VisibilityComponent extends BaseComponent implements OnInit {
                                                    +    showCustomPassword = false;
                                                    +    baseUrl = environment.baseApiHref;
                                                    +    environment = environment;
                                                    +
                                                    +    constructor(public config: ConfigService,
                                                    +                public utils: PollUtilities) {
                                                    +        super(config);
                                                    +    }
                                                    +
                                                    +    ngOnInit() {
                                                    +        this.config.customUrl = this.utils.makeSlug(this.config);
                                                    +        this.config.expirationDate = (this.config.addDaysToDate(this.config.expiracyDateDefaultInDays, new Date())).toISOString().substring(0, 10);
                                                    +    }
                                                    +
                                                    +    submitCreationAndGoToEnd() {
                                                    +        this.config.createPoll();
                                                    +    }
                                                    +
                                                    +}
                                                    +
                                                    +
                                                    + +
                                                    +
                                                    <h1 i18n >
                                                    +    {{"visibility.top_txt"|translate}}
                                                    +</h1 >
                                                    +<section class="answers" >
                                                    +    <h2 >
                                                    +        {{"visibility.title"|translate}}
                                                    +    </h2 >
                                                    +    <span >
                                                    +    {{"visibility.visibility_want"|translate}}
                                                    +    </span >
                                                    +    <select
                                                    +        name="visible_people"
                                                    +        id="visible_people"
                                                    +        [(ngModel)]="config.visibility"
                                                    +    >
                                                    +        <option value="link_only" >
                                                    +            {{"visibility.visibility_link"|translate}}
                                                    +        </option >
                                                    +        <option value="only_me" >
                                                    +            {{"visibility.visibility_nobody"|translate}}
                                                    +        </option >
                                                    +    </select >
                                                    +    <span >
                                                    +    {{"visibility.visibility_see"|translate}}
                                                    +    </span >
                                                    +
                                                    +</section >
                                                    +
                                                    +<section class="possible_votes" >
                                                    +    <h2 >
                                                    +        {{"visibility.votes"|translate}}
                                                    +    </h2 >
                                                    +    <label for="votes" >
                                                    +        {{"visibility.votes_possible"|translate}}
                                                    +    </label >
                                                    +    <select
                                                    +        name="votes"
                                                    +        id="votes"
                                                    +        [(ngModel)]="config.voteChoices"
                                                    +    >
                                                    +        <option value="only_yes" >
                                                    +            {{"visibility.votes_possible_single"|translate}}
                                                    +        </option >
                                                    +        <option value="normal" >
                                                    +            {{"visibility.votes_possible_normal"|translate}}
                                                    +        </option >
                                                    +        <option value="full" >
                                                    +            {{"visibility.votes_possible_full"|translate}}
                                                    +        </option >
                                                    +    </select >
                                                    +</section >
                                                    +<section class="expiracy" >
                                                    +    <label for="expirationDate" >
                                                    +        {{"visibility.archiving"|translate}}
                                                    +    </label >
                                                    +
                                                    +    <input
                                                    +        type="date"
                                                    +        id="expirationDate"
                                                    +        [(ngModel)]="config.expirationDate" >
                                                    +    <div class="modification" >
                                                    +        <label for="modificationAbility" >
                                                    +            {{"visibility.archiving_start"|translate}}
                                                    +        </label >
                                                    +        <select
                                                    +            name="modificationAbility"
                                                    +            id="modificationAbility"
                                                    +            [(ngModel)]="config.canModifyAnswers" >
                                                    +            <option value=true >
                                                    +                {{"visibility.archiving_can"|translate}}
                                                    +            </option >
                                                    +            <option value=false >
                                                    +                {{"visibility.archiving_can_not"|translate}}
                                                    +            </option >
                                                    +        </select >
                                                    +        <label for="modificationScope" >
                                                    +            {{"visibility.archiving_end"|translate}}
                                                    +        </label >
                                                    +
                                                    +        <span *ngIf="false == !!config.canModifyAnswers" >
                                                    +        {{"visibility.modfiy_their"|translate}}
                                                    +        </span >
                                                    +        <select
                                                    +            name="modificationScope"
                                                    +            id="modificationScope"
                                                    +            *ngIf="true == !!config.canModifyAnswers"
                                                    +            [(ngModel)]="config.whoModifiesAnswers"
                                                    +            [disabled]="false == !!config.canModifyAnswers" >
                                                    +            <option value="self" >
                                                    +                {{"visibility.modfiy_their"|translate}}
                                                    +            </option >
                                                    +            <option value="everybody" >
                                                    +                {{"visibility.modfiy_everyone"|translate}}
                                                    +            </option >
                                                    +        </select >
                                                    +
                                                    +    </div >
                                                    +
                                                    +</section >
                                                    +<section class="access" >
                                                    +    <h2 class='title' >
                                                    +        {{"visibility.access"|translate}}
                                                    +    </h2 >
                                                    +    <label for="url" >
                                                    +        {{"visibility.access_url"|translate}}
                                                    +        <br >
                                                    +        {{"visibility.access_url_key"|translate}}
                                                    +    </label >
                                                    +    <br >
                                                    +    <input
                                                    +        type="name"
                                                    +        class="input-lg"
                                                    +        name="url"
                                                    +        id="url"
                                                    +        [(ngModel)]="config.customUrl" >
                                                    +
                                                    +    <sub class="instructions" >
                                                    +        {{"visibility.access_instructions"|translate}}
                                                    +    </sub >
                                                    +    <div class="preview-url" >
                                                    +        <a [href]="'/#/vote/poll/slug/' + config.customUrl" >
                                                    +            {{environment.baseHref + '#/vote/poll/slug/' + config.customUrl}}
                                                    +        </a >
                                                    +        <framadate-copy-text [textToCopy]='config.urlPublic' ></framadate-copy-text >
                                                    +    </div >
                                                    +    <br >
                                                    +    <label for="passwordAccess" >
                                                    +        {{"visibility.access_want"|translate}}
                                                    +    </label >
                                                    +    <select
                                                    +        name="passwordAccess"
                                                    +        id="passwordAccess"
                                                    +        [(ngModel)]="config.passwordAccess" >
                                                    +        <option value="0" >  {{"visibility.access_want_no"|translate}}</option >
                                                    +        <option value="1" >  {{"visibility.access_want_yes"|translate}}</option >
                                                    +    </select >
                                                    +
                                                    +    <label for="password" >
                                                    +        {{"visibility.access_protect"|translate}}
                                                    +    </label >
                                                    +
                                                    +    <div
                                                    +        class="enablepassword"
                                                    +        *ngIf="config.passwordAccess == 1" >
                                                    +        <input
                                                    +            type="password"
                                                    +            name="password"
                                                    +            id="password"
                                                    +            min="8"
                                                    +            *ngIf="!showCustomPassword"
                                                    +            [(ngModel)]="config.password" >
                                                    +        <input
                                                    +            type="name"
                                                    +            name="password_visible"
                                                    +            id="password_visible"
                                                    +            min="8"
                                                    +            *ngIf="showCustomPassword"
                                                    +            [(ngModel)]="config.password" >
                                                    +        <button
                                                    +            (click)="showCustomPassword = !showCustomPassword"
                                                    +            [disabled]="!config.password"
                                                    +            class="btn btn--default" >
                                                    +            <i class="fa fa-eye" ></i >
                                                    +            {{"visibility.see_pass"|translate}}
                                                    +        </button >
                                                    +    </div >
                                                    +</section >
                                                    +
                                                    +<button
                                                    +    (click)='submitCreationAndGoToEnd()'
                                                    +    class="btn btn--primary btn--full"
                                                    +    i18n="@@confirm" >
                                                    +    {{"visibility.validate_btn"|translate}}
                                                    +    <i
                                                    +        class='fa fa-paper-plane'
                                                    +        *ngIf="!config.loading" ></i >
                                                    +    <span
                                                    +        class="loading"
                                                    +        *ngIf="config.loading" >
                                                    +        <i class="fa fa-refresh fa-spin fa-fw" ></i >
                                                    +    </span >
                                                    +</button >
                                                    +
                                                    +<div class="back" >
                                                    +
                                                    +    <a
                                                    +        [routerLink]="'/step/answers'"
                                                    +        class="prev" >
                                                    +        Retour
                                                    +    </a >
                                                    +</div >
                                                    +
                                                    +
                                                    + +
                                                    +

                                                    + ./visibility.component.scss +

                                                    +
                                                    :host {
                                                    +    h2 {
                                                    +        margin-top: 1em;
                                                    +    }
                                                    +}
                                                    +
                                                    +
                                                    + +
                                                    +
                                                    +
                                                    +
                                                    + Legend +
                                                    +
                                                    +
                                                    Html element +
                                                    +
                                                    +
                                                    Component +
                                                    +
                                                    +
                                                    Html element with directive +
                                                    +
                                                    +
                                                    + + +
                                                    + + + + + + + + + + + + + + + + + + + + + +
                                                    +
                                                    +

                                                    result-matching ""

                                                    +
                                                      +
                                                      +
                                                      +

                                                      No results matching ""

                                                      +
                                                      +
                                                      +
                                                      + +
                                                      +
                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/VotingChoiceComponent.html b/documentation/components/VotingChoiceComponent.html new file mode 100644 index 00000000..fb726178 --- /dev/null +++ b/documentation/components/VotingChoiceComponent.html @@ -0,0 +1,1126 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                                                      +
                                                      + + +
                                                      +
                                                      + + + + + + + + +
                                                      +

                                                      +

                                                      File

                                                      +

                                                      +

                                                      + src/app/pages/voting/voting-choice/voting-choice.component.ts +

                                                      + +

                                                      +

                                                      Description

                                                      +

                                                      +

                                                      +

                                                      each vote choice takes a configuration from the container of all choices. +this component is used to select a date choice, or a name answer

                                                      + +

                                                      + + + + +
                                                      +

                                                      Metadata

                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                      selectorframadate-voting-choice
                                                      styleUrls./voting-choice.component.scss
                                                      templateUrl./voting-choice.component.html
                                                      +
                                                      + +
                                                      +

                                                      Index

                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                      +
                                                      Properties
                                                      +
                                                      + +
                                                      +
                                                      Methods
                                                      +
                                                      + +
                                                      +
                                                      Inputs
                                                      +
                                                      + +
                                                      +
                                                      + +
                                                      +

                                                      Constructor

                                                      + + + + + + + + + + + + + +
                                                      +constructor(el: ElementRef, config: ConfigService) +
                                                      + +
                                                      +
                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                      NameTypeOptional
                                                      el + ElementRef + + No +
                                                      config + ConfigService + + No +
                                                      +
                                                      +
                                                      +
                                                      + +
                                                      +

                                                      Inputs

                                                      + + + + + + + + + + + + +
                                                      + + choice +
                                                      + Type : any + +
                                                      + +
                                                      + + + + + + + + + + + + +
                                                      + + choice_id +
                                                      + Type : any + +
                                                      + +
                                                      + + + + + + + + + + + + +
                                                      + + choices_count +
                                                      + Type : any + +
                                                      + +
                                                      + + + + + + + + + + + + +
                                                      + + poll +
                                                      + Type : any + +
                                                      + +
                                                      + + + + + + + + + + + + + + + +
                                                      + + pollIsSpecialDate +
                                                      + Type : boolean + +
                                                      + Default value : false +
                                                      + +
                                                      + + + + + + + + + + + + + + + +
                                                      + + simpleAnswer +
                                                      + Type : boolean + +
                                                      + Default value : true +
                                                      + +
                                                      +
                                                      + + + +
                                                      + +

                                                      + Methods +

                                                      + + + + + + + + + + + + + + + + + + + +
                                                      + + + + setAnswserTo + + + +
                                                      +setAnswserTo(newAnswer: "yes" | "no" | "maybe" | null) +
                                                      + +
                                                      + +
                                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                                      NameTypeOptional
                                                      newAnswer + "yes" | "no" | "maybe" | null + + No +
                                                      +
                                                      +
                                                      +
                                                      +
                                                      + Returns : void + +
                                                      +
                                                      + +
                                                      +
                                                      +
                                                      +
                                                      + +

                                                      + Properties +

                                                      + + + + + + + + + + + + + + +
                                                      + + + + Public + showChangeChoicebutton + + +
                                                      + Default value : false +
                                                      + +
                                                      +
                                                      + +
                                                      + + +
                                                      +
                                                      import {Component, ElementRef, Input} from '@angular/core';
                                                      +import {ConfigService} from "../../../services/config.service";
                                                      +
                                                      +interface VoteChoice {
                                                      +    votes?: {
                                                      +        yes: number
                                                      +        no: number
                                                      +        maybe: number
                                                      +        notAnswered: number
                                                      +    };
                                                      +    name?: string;
                                                      +    date?: Date;
                                                      +    answer: 'yes' | 'no' | 'maybe' | null;
                                                      +    simpleAnswer?: boolean
                                                      +    false; // enable if we display only a togglable "yes"
                                                      +}
                                                      +
                                                      +/**
                                                      + * each vote choice takes a configuration from the container of all choices.
                                                      + * this component is used to select a date choice, or a name answer
                                                      + */
                                                      +@Component({
                                                      +    selector: 'framadate-voting-choice',
                                                      +    templateUrl: './voting-choice.component.html',
                                                      +    styleUrls: ['./voting-choice.component.scss']
                                                      +})
                                                      +export class VotingChoiceComponent {
                                                      +
                                                      +    public showChangeChoicebutton = false;
                                                      +    @Input() public choice: any;
                                                      +    @Input() public choices_count: any;
                                                      +    @Input() public choice_id: any;
                                                      +    @Input() public poll: any;
                                                      +    @Input() public simpleAnswer: boolean = true;
                                                      +    @Input() public pollIsSpecialDate: boolean = false;
                                                      +
                                                      +    constructor(private el: ElementRef,
                                                      +                private config: ConfigService) {
                                                      +
                                                      +        if (this.poll && this.poll.allowedAnswers) {
                                                      +            this.simpleAnswer = this.poll.allowedAnswers.length == 1
                                                      +        }
                                                      +    }
                                                      +
                                                      +    setAnswserTo(newAnswer: 'yes' | 'no' | 'maybe' | null) {
                                                      +        if (this.simpleAnswer) {
                                                      +            // only toggle yes to no
                                                      +            if (this.choice.answer && this.choice.answer === 'yes') {
                                                      +                this.choice.answer = 'no';
                                                      +                this.config.myTempVoteStack--;
                                                      +            } else {
                                                      +                this.choice.answer = newAnswer;
                                                      +                this.config.myTempVoteStack++;
                                                      +            }
                                                      +
                                                      +        } else {
                                                      +            this.choice.answer = newAnswer;
                                                      +            if (this.choice.answer !== newAnswer) {
                                                      +                if (newAnswer == 'maybe' || newAnswer == 'yes') {
                                                      +                    this.config.myTempVoteStack++;
                                                      +                }
                                                      +            } else {
                                                      +                console.info('same answer as before')
                                                      +            }
                                                      +
                                                      +        }
                                                      +        this.el.nativeElement.blur();
                                                      +    }
                                                      +
                                                      +}
                                                      +
                                                      +
                                                      + +
                                                      +
                                                      <div class="choicebox selection-{{choice.answer}}" >
                                                      +    <!-- add .choicebox--active to most voted -->
                                                      +    <button
                                                      +        *ngIf='showChangeChoicebutton'
                                                      +        class='btn btn--primary'
                                                      +        (click)=' choice.simpleAnswer = !choice.simpleAnswer' >
                                                      +        <i class='fa fa-gears' ></i >
                                                      +    </button >
                                                      +
                                                      +    <div class="choicebox__subject" >
                                                      +        <div class='columns' >
                                                      +            <div class='column' >
                                                      +                <div
                                                      +                    class="text title clickable"
                                                      +                    (click)="setAnswserTo('yes')" >
                                                      +                    {{choice.text}}
                                                      +                </div > <!-- TEXT CASE --><!--
                                                      +        <p class="choicebox__txt">
                                                      +            Lorem ipsum dolor sit amet consectetur, adipisicing elit. Nulla nobis nam culpa !
                                                      +        </p>
                                                      +        --><!-- TEXT CASE -->
                                                      +
                                                      +                        <!-- IMG CASE -->
                                                      +                <img
                                                      +                    *ngIf='choice.url'
                                                      +                    class="choicebox__img"
                                                      +                    [src]="choice.url"
                                                      +                    alt="{{choice.url}}"
                                                      +                >
                                                      +                        <!-- IMG CASE -->
                                                      +
                                                      +                        <!-- DATE CASE  -->
                                                      +                <div
                                                      +                    class="dates"
                                                      +                    *ngIf="pollIsSpecialDate" >
                                                      +                    <div class="choicebox__date" >
                                                      +                        {{choice.date.date | date:'EEE'}} <span
                                                      +                        class="choicebox__day" >{{choice.date.date | date:'dd'}}</span > {{choice.date.date | date:'LLL'}}
                                                      +                    </div >
                                                      +                    <div class="choicebox__hour" >
                                                      +                        {{choice.date.date | date:'H:m'}}
                                                      +                    </div >
                                                      +                </div >
                                                      +                        <!-- DATE CASE -->
                                                      +            </div >
                                                      +            <div class='column' >
                                                      +                <div class="choicebox__actions" >
                                                      +                    <!-- show only the yes check if the config is set to simpleAnswer -->
                                                      +                    <!-- add .choicebox__btn--active to selected <button> -->
                                                      +                    <span class="simple-answer" >
                                                      +
                                                      +        <button
                                                      +            class="choicebox__btn choicebox__btn--yes"
                                                      +            type="button"
                                                      +            [ngClass]="{'choicebox__btn--active': choice.answer === 'yes'}"
                                                      +            (click)="setAnswserTo('yes')" >
                                                      +            <img
                                                      +                src="../../../assets/img/check.svg"
                                                      +                alt="" >
                                                      +        </button >
                                                      +        </span >
                                                      +                    <span
                                                      +                        class="complex-answers"
                                                      +                        *ngIf="!simpleAnswer" >
                                                      +            <button
                                                      +                class="choicebox__btn choicebox__btn--maybe"
                                                      +                type="button"
                                                      +                [ngClass]="{'choicebox__btn--active': choice.answer === 'maybe'}"
                                                      +                (click)="setAnswserTo('maybe')" >
                                                      +            <img
                                                      +                src="../../../assets/img/check-2.svg"
                                                      +                alt="" >
                                                      +        </button >
                                                      +        <button
                                                      +            class="choicebox__btn choicebox__btn--no"
                                                      +            type="button"
                                                      +            [ngClass]="{'choicebox__btn--active': choice.answer === 'no'}"
                                                      +            (click)="setAnswserTo('no')"
                                                      +        >
                                                      +            <img
                                                      +                src="../../../assets/img/croix.svg"
                                                      +                alt="" >
                                                      +        </button >
                                                      +        </span >
                                                      +
                                                      +                </div >
                                                      +            </div >
                                                      +            <div class='column' >
                                                      +                <div class="choicebox__count" >
                                                      +
                                                      +                    <div
                                                      +                        class='no-votes'
                                                      +                        *ngIf='! poll.choices_count.counts[choice.id] ' >
                                                      +                        aucun vote
                                                      +                    </div >
                                                      +                    <button
                                                      +                        type="button"
                                                      +                        aria-describedby="choicebox-tooltip"
                                                      +                        class="choicebox__votes"
                                                      +                        *ngIf="poll.choices_count && choice && poll.choices_count.counts[choice.id]" >
                                                      +                        <div class="choicebox__vote" >
                                                      +                            {{poll.choices_count.counts[choice.id].yes.count}}
                                                      +                            <img
                                                      +                                width="20px"
                                                      +                                height="21px"
                                                      +                                src="../../../assets/img/votant-sur.svg"
                                                      +                                alt="" >
                                                      +                        </div >
                                                      +                        <div class="choicebox__vote" >
                                                      +                            {{poll.choices_count.counts[choice.id].maybe.count}}
                                                      +                            <img
                                                      +                                width="22px"
                                                      +                                height="24px"
                                                      +                                src="../../../assets/img/votant-pas-sur.svg"
                                                      +                                alt="" >
                                                      +                        </div >
                                                      +                        <div
                                                      +                            class="choicebox__tooltip"
                                                      +                            id="choicebox-tooltip" >
                                                      +                            <div class="choicebox__tooltiplist" >
                                                      +                                <div class="choicebox__tooltipttl" >
                                                      +                                    <img
                                                      +                                        width="20px"
                                                      +                                        height="21px"
                                                      +                                        src="../../../assets/img/votant-sur.svg"
                                                      +                                        alt="" >
                                                      +                                    {{poll.choices_count.counts[choice.id].yes.count}} "Oui"
                                                      +                                </div >
                                                      +                                <!--                    liste des gens qui ont répondu oui-->
                                                      +                                <ul >
                                                      +                                    <li *ngFor='let pseudo of choices_count.counts[choice.id].yes.people ' >{{pseudo}}</li >
                                                      +                                </ul >
                                                      +                            </div >
                                                      +                            <div
                                                      +                                class="choicebox__tooltiplist"
                                                      +                                *ngIf='!simpleAnswer' >
                                                      +                                <div class="choicebox__tooltipttl" >
                                                      +                                    <img
                                                      +                                        width="22px"
                                                      +                                        height="24px"
                                                      +                                        src="../../../assets/img/votant-pas-sur.svg"
                                                      +                                        alt="" >
                                                      +                                    {{poll.choices_count.counts[choice.id].maybe.count}} "Peut-être"
                                                      +                                </div >
                                                      +                                <ul >
                                                      +                                    <li *ngFor='let pseudo of choices_count.counts[choice.id].maybe.people ' >{{pseudo}}</li >
                                                      +                                </ul >
                                                      +                            </div >
                                                      +                            <div
                                                      +                                class="choicebox__tooltiplist"
                                                      +                                *ngIf='!simpleAnswer' >
                                                      +                                <div class="choicebox__tooltipttl" >
                                                      +                                    <i class='fa fa-times' ></i >
                                                      +                                    {{poll.choices_count.counts[choice.id].no.count}} "Non"
                                                      +                                </div >
                                                      +                                <ul >
                                                      +                                    <li *ngFor='let pseudo of choices_count.counts[choice.id].no.people ' >{{pseudo}}</li >
                                                      +                                </ul >
                                                      +                            </div >
                                                      +                        </div >
                                                      +                    </button >
                                                      +                    <div class="choicebox__countxt" >
                                                      +                        Choix ayant reçu le plus de votes
                                                      +                    </div >
                                                      +                </div >
                                                      +            </div >
                                                      +        </div >
                                                      +
                                                      +    </div >
                                                      +
                                                      +</div >
                                                      +
                                                      +
                                                      + +
                                                      +

                                                      + ./voting-choice.component.scss +

                                                      +
                                                      // ---------------------------------------------------------
                                                      +// -- VOTE CHOICE COMPONENT
                                                      +// ---------------------------------------------------------
                                                      +
                                                      +// -- IMPORTS
                                                      +// ----------------------------
                                                      +
                                                      +@import "../../../../assets/scss/variables";
                                                      +
                                                      +
                                                      +// -- VARIABLES
                                                      +// ----------------------------
                                                      +
                                                      +$box-padding: 2rem;
                                                      +$box-border-width: .6rem;
                                                      +$btn-size: 5rem;
                                                      +$btn-margin-x: 1rem;
                                                      +$btn-margin-y: 1.5rem;
                                                      +$btn-wrap-size: calc(2 * #{$btn-size} + 4 * #{$btn-margin-x});
                                                      +$img-maxheight: 12rem;
                                                      +$breakpoint-responsive: 640px; // à définir
                                                      +
                                                      +
                                                      +// -- GLOBAL
                                                      +// ----------------------------
                                                      +
                                                      +.choicebox {
                                                      +    position: relative;
                                                      +    min-width: 32rem;
                                                      +    min-height: 16rem;
                                                      +    display: block;
                                                      +    padding: $box-padding $box-padding $box-padding calc(#{$box-padding} - #{$box-border-width});
                                                      +    border-left: $box-border-width solid transparent;
                                                      +    background-color: $white;
                                                      +    box-shadow: 0 0 .6rem 0 rgba($black, .2);
                                                      +
                                                      +    &--active {
                                                      +        padding-left: $box-padding;
                                                      +        border-left-color: $primary_color;
                                                      +    }
                                                      +
                                                      +    &.selection-yes {
                                                      +        font-weight: 700;
                                                      +        background: #e9bdeb;
                                                      +    }
                                                      +}
                                                      +
                                                      +.choicebox__subject {
                                                      +    margin-bottom: 3rem;
                                                      +    padding-right: $btn-wrap-size;
                                                      +    @media (min-width: $breakpoint-responsive) {
                                                      +        margin-bottom: 0;
                                                      +        padding-right: 0;
                                                      +    }
                                                      +}
                                                      +
                                                      +
                                                      +// -- DATE
                                                      +// ----------------------------
                                                      +
                                                      +.choicebox__date {
                                                      +    font-size: 1.8rem;
                                                      +    margin-bottom: .5rem;
                                                      +    white-space: nowrap;
                                                      +    text-transform: capitalize;
                                                      +
                                                      +    @media (min-width: $breakpoint-responsive) {
                                                      +        margin-bottom: 0;
                                                      +    }
                                                      +}
                                                      +
                                                      +.choicebox__day {
                                                      +    font-size: 2.4rem;
                                                      +    font-weight: bold;
                                                      +}
                                                      +
                                                      +
                                                      +// -- IMG
                                                      +// ----------------------------
                                                      +
                                                      +.choicebox__img {
                                                      +    max-width: 100%;
                                                      +    max-height: $img-maxheight;
                                                      +}
                                                      +
                                                      +
                                                      +// -- TXT
                                                      +// ----------------------------
                                                      +
                                                      +.choicebox__txt {
                                                      +    margin: 0;
                                                      +    font-size: 1.8rem;
                                                      +    min-width: 10em;
                                                      +}
                                                      +
                                                      +
                                                      +// -- VOTE BTNS
                                                      +// ----------------------------
                                                      +
                                                      +.choicebox__actions {
                                                      +    position: absolute;
                                                      +    z-index: 1;
                                                      +
                                                      +    max-width: $btn-wrap-size;
                                                      +    top: 50%;
                                                      +    right: $box-padding;
                                                      +
                                                      +    @media (min-width: $breakpoint-responsive) {
                                                      +        position: static;
                                                      +        max-width: none;
                                                      +        transform: none;
                                                      +        margin: 0 1.5rem;
                                                      +    }
                                                      +}
                                                      +
                                                      +.choicebox__btn {
                                                      +    width: $btn-size;
                                                      +    height: $btn-size;
                                                      +    align-items: center;
                                                      +    justify-content: center;
                                                      +    margin: $btn-margin-y $btn-margin-x;
                                                      +    border: .3rem solid #ccc9c9;
                                                      +    background-color: transparent;
                                                      +    border-radius: 50%;
                                                      +    cursor: pointer;
                                                      +    float: left;
                                                      +
                                                      +    &--maybe {
                                                      +        position: relative;
                                                      +        top: calc((#{$btn-size} + 2 * #{$btn-margin-y}) / 2);
                                                      +        @media (min-width: $breakpoint-responsive) {
                                                      +            top: auto;
                                                      +            left: auto;
                                                      +        }
                                                      +    }
                                                      +
                                                      +    &--active {
                                                      +        border-color: #bf83c2;
                                                      +    }
                                                      +
                                                      +    @media (min-width: $breakpoint-responsive) {
                                                      +        margin-top: 0;
                                                      +        margin-bottom: 0;
                                                      +    }
                                                      +
                                                      +}
                                                      +
                                                      +
                                                      +// -- VOTE COUNT
                                                      +// ----------------------------
                                                      +
                                                      +.choicebox__count {
                                                      +    position: relative;
                                                      +    padding-right: $btn-wrap-size;
                                                      +    @media (min-width: $breakpoint-responsive) {
                                                      +        text-align: right;
                                                      +        padding-right: 0;
                                                      +    }
                                                      +}
                                                      +
                                                      +.choicebox__votes {
                                                      +    border: 0;
                                                      +    padding: 0;
                                                      +    line-height: normal;
                                                      +    background-color: transparent;
                                                      +    @media (min-width: $breakpoint-responsive) {
                                                      +        padding: 1.5rem;
                                                      +    }
                                                      +}
                                                      +
                                                      +.choicebox__vote {
                                                      +    display: inline-block;
                                                      +    vertical-align: middle;
                                                      +
                                                      +    & + .choicebox__vote {
                                                      +        margin-left: 1.5rem;
                                                      +    }
                                                      +}
                                                      +
                                                      +.choicebox__countxt {
                                                      +    display: none;
                                                      +    margin-top: .5rem;
                                                      +
                                                      +    .choicebox--active & {
                                                      +        display: block;
                                                      +        @media (min-width: $breakpoint-responsive) {
                                                      +            display: none;
                                                      +        }
                                                      +    }
                                                      +}
                                                      +
                                                      +
                                                      +// -- TOOLTIP
                                                      +// ----------------------------
                                                      +
                                                      +.choicebox__tooltip {
                                                      +    display: none;
                                                      +    @media (min-width: $breakpoint-responsive) {
                                                      +        position: absolute;
                                                      +        min-width: 18rem;
                                                      +        font-weight: normal;
                                                      +        top: 5rem;
                                                      +        left: 50%;
                                                      +        z-index: 1;
                                                      +        padding: 2rem;
                                                      +        border: .1rem solid rgba($black, .1);
                                                      +        background-color: $white;
                                                      +        text-align: left;
                                                      +        transform: translateX(-50%);
                                                      +        &::after,
                                                      +        &::before {
                                                      +            position: absolute;
                                                      +            width: 0;
                                                      +            height: 0;
                                                      +            bottom: 100%;
                                                      +            left: 50%;
                                                      +            content: " ";
                                                      +            pointer-events: none;
                                                      +            border: solid transparent;
                                                      +        }
                                                      +        &::after {
                                                      +            margin-left: -1.5rem;
                                                      +            border-width: 1.5rem;
                                                      +            border-color: rgba($white, 0);
                                                      +            border-bottom-color: #fff;
                                                      +        }
                                                      +        &::before {
                                                      +            margin-left: -1.6rem;
                                                      +            border-width: 1.6rem;
                                                      +            border-color: rgba($black, 0);
                                                      +            border-bottom-color: rgba($black, .1);
                                                      +        }
                                                      +        ul {
                                                      +            margin: 0;
                                                      +            padding: 0;
                                                      +            list-style: none;
                                                      +        }
                                                      +    }
                                                      +}
                                                      +
                                                      +.choicebox__tooltiplist {
                                                      +    & + .choicebox__tooltiplist {
                                                      +        padding-left: 3rem;
                                                      +    }
                                                      +
                                                      +    ul {
                                                      +        max-height: 11rem;
                                                      +        overflow: auto;
                                                      +    }
                                                      +}
                                                      +
                                                      +.choicebox__tooltipttl {
                                                      +    @media (min-width: $breakpoint-responsive) {
                                                      +        margin-bottom: 1rem;
                                                      +        font-size: 1.6rem;
                                                      +        font-weight: bold;
                                                      +        white-space: nowrap;
                                                      +        img {
                                                      +            margin-right: .5rem;
                                                      +            vertical-align: sub;
                                                      +        }
                                                      +        & ~ .choicebox__tooltipttl {
                                                      +            margin-top: 3rem;
                                                      +        }
                                                      +    }
                                                      +}
                                                      +
                                                      +
                                                      + +
                                                      +
                                                      +
                                                      +
                                                      + Legend +
                                                      +
                                                      +
                                                      Html element +
                                                      +
                                                      +
                                                      Component +
                                                      +
                                                      +
                                                      Html element with directive +
                                                      +
                                                      +
                                                      + + +
                                                      + + + + + + + + + + + + + + + + + + + + + +
                                                      +
                                                      +

                                                      result-matching ""

                                                      +
                                                        +
                                                        +
                                                        +

                                                        No results matching ""

                                                        +
                                                        +
                                                        +
                                                        + +
                                                        +
                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/VotingCommentComponent.html b/documentation/components/VotingCommentComponent.html new file mode 100644 index 00000000..297fb8ce --- /dev/null +++ b/documentation/components/VotingCommentComponent.html @@ -0,0 +1,397 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                                                        +
                                                        + + +
                                                        +
                                                        + + + + + + + + +
                                                        +

                                                        +

                                                        File

                                                        +

                                                        +

                                                        + src/app/pages/voting/voting-comment/voting-comment.component.ts +

                                                        + + + +

                                                        +

                                                        Implements

                                                        +

                                                        +

                                                        + OnInit +

                                                        + + +
                                                        +

                                                        Metadata

                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                        selectorframadate-voting-comment
                                                        styleUrls./voting-comment.component.scss
                                                        templateUrl./voting-comment.component.html
                                                        +
                                                        + +
                                                        +

                                                        Index

                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                        +
                                                        Methods
                                                        +
                                                        + +
                                                        +
                                                        Inputs
                                                        +
                                                        + +
                                                        +
                                                        + +
                                                        +

                                                        Constructor

                                                        + + + + + + + + + + +
                                                        +constructor() +
                                                        + +
                                                        +
                                                        + +
                                                        +

                                                        Inputs

                                                        + + + + + + + + + + + + +
                                                        + + comment +
                                                        + Default value : mockComments[0] +
                                                        + +
                                                        +
                                                        + + + +
                                                        + +

                                                        + Methods +

                                                        + + + + + + + + + + + + + + + + + + + +
                                                        + + + + ngOnInit + + + +
                                                        +ngOnInit() +
                                                        + +
                                                        + +
                                                        + Returns : void + +
                                                        +
                                                        +
                                                        + +
                                                        + + +
                                                        +
                                                        import {Component, Input, OnInit} from '@angular/core';
                                                        +import {mockComments} from "../../../config/mocks/mock-comments";
                                                        +
                                                        +@Component({
                                                        +    selector: 'framadate-voting-comment',
                                                        +    templateUrl: './voting-comment.component.html',
                                                        +    styleUrls: ['./voting-comment.component.scss']
                                                        +})
                                                        +export class VotingCommentComponent implements OnInit {
                                                        +
                                                        +    @Input() comment = mockComments[0];
                                                        +
                                                        +    constructor() {
                                                        +    }
                                                        +
                                                        +    ngOnInit() {
                                                        +    }
                                                        +
                                                        +}
                                                        +
                                                        +
                                                        + +
                                                        +
                                                        <div class="comment" >
                                                        +    <span class="cname" >
                                                        +        {{comment.pseudo}}
                                                        +    </span >, le
                                                        +    <span class="date padding-btm-x1" >
                                                        +                {{comment.date.date }}
                                                        +    </span >
                                                        +    <blockquote >
                                                        +        <p class="text" >
                                                        +            {{comment.text}}
                                                        +        </p >
                                                        +    </blockquote >
                                                        +</div >
                                                        +
                                                        +
                                                        + +
                                                        +

                                                        + ./voting-comment.component.scss +

                                                        +
                                                        +
                                                        + +
                                                        +
                                                        +
                                                        +
                                                        + Legend +
                                                        +
                                                        +
                                                        Html element +
                                                        +
                                                        +
                                                        Component +
                                                        +
                                                        +
                                                        Html element with directive +
                                                        +
                                                        +
                                                        + + +
                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                        +
                                                        +

                                                        result-matching ""

                                                        +
                                                          +
                                                          +
                                                          +

                                                          No results matching ""

                                                          +
                                                          +
                                                          +
                                                          + +
                                                          +
                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/VotingComponent.html b/documentation/components/VotingComponent.html new file mode 100644 index 00000000..aaf3b2bd --- /dev/null +++ b/documentation/components/VotingComponent.html @@ -0,0 +1,421 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                                                          +
                                                          + + +
                                                          +
                                                          + + + + + + + + +
                                                          +

                                                          +

                                                          File

                                                          +

                                                          +

                                                          + src/app/pages/voting/voting.component.ts +

                                                          + + + +

                                                          +

                                                          Implements

                                                          +

                                                          +

                                                          + OnInit +

                                                          + + +
                                                          +

                                                          Metadata

                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                          selectorframadate-voting
                                                          styleUrls./voting.component.scss
                                                          templateUrl./voting.component.html
                                                          +
                                                          + +
                                                          +

                                                          Index

                                                          + + + + + + + + + + + + + + + + + + + + + +
                                                          +
                                                          Properties
                                                          +
                                                          + +
                                                          +
                                                          Methods
                                                          +
                                                          + +
                                                          +
                                                          + +
                                                          +

                                                          Constructor

                                                          + + + + + + + + + + +
                                                          +constructor() +
                                                          + +
                                                          +
                                                          + + + + + +
                                                          + +

                                                          + Methods +

                                                          + + + + + + + + + + + + + + + + + + + +
                                                          + + + + ngOnInit + + + +
                                                          +ngOnInit() +
                                                          + +
                                                          + +
                                                          + Returns : void + +
                                                          +
                                                          +
                                                          +
                                                          + +

                                                          + Properties +

                                                          + + + + + + + + + + + + + + +
                                                          + + + + show_mask + + +
                                                          + Default value : true +
                                                          + +
                                                          +
                                                          + +
                                                          + + +
                                                          +
                                                          import { Component, OnInit } from '@angular/core';
                                                          +
                                                          +@Component({
                                                          +  selector: 'framadate-voting',
                                                          +  templateUrl: './voting.component.html',
                                                          +  styleUrls: ['./voting.component.scss']
                                                          +})
                                                          +export class VotingComponent implements OnInit {
                                                          +  show_mask=true;
                                                          +  constructor() {
                                                          +   }
                                                          +
                                                          +  ngOnInit() {
                                                          +  }
                                                          +
                                                          +}
                                                          +
                                                          +
                                                          + +
                                                          +
                                                          <form>
                                                          +
                                                          +
                                                          +    <a class="next">Voir le graphique</a>
                                                          +
                                                          +    <h2 class="margin-top-x4">Les commentaires</h2>
                                                          +    <p class="comment">
                                                          +        <span class="cname">Pikachu </span>
                                                          +        <span class="date date padding-btm-x1"> le 26 novembre 2019</span>
                                                          +        Rock Luxio Surskit. Glacier Badge
                                                          +    </p>
                                                          +
                                                          +
                                                          +
                                                          +
                                                          +</form>
                                                          +<div ng-show="show_popup" class="popup">
                                                          +    <h4 class="margin-btm-x2">Participation validée !</h4>
                                                          +    <p class="margin-btm-x1">Votre vote a bien été pris en compte, mais faites attention : ce sondage n'autorise
                                                          +        l'édition de votre vote qu'avec le lien personnalisé suivant :</p>
                                                          +    <p>https://framadate.org/urladmindusondage</p>
                                                          +    <button class="btn btn--primary btn--small btn--purple btn--black-text">Copier le lien</button>
                                                          +    <p class="margin-btm-x6 margin-top-x2">Conservez-le précieusement !</p>
                                                          +    <button class="btn btn--primary btn--default btn--purple btn--black-text">Revenir au sondage</button>
                                                          +
                                                          +
                                                          +</div>
                                                          +<div class="rgba-black" [hidden]="show_mask">
                                                          +
                                                          +</div>
                                                          +
                                                          +
                                                          + +
                                                          +

                                                          + ./voting.component.scss +

                                                          +
                                                          +
                                                          + +
                                                          +
                                                          +
                                                          +
                                                          + Legend +
                                                          +
                                                          +
                                                          Html element +
                                                          +
                                                          +
                                                          Component +
                                                          +
                                                          +
                                                          Html element with directive +
                                                          +
                                                          +
                                                          + + +
                                                          + + + + + + + + + + + + + + + + + + + + + +
                                                          +
                                                          +

                                                          result-matching ""

                                                          +
                                                            +
                                                            +
                                                            +

                                                            No results matching ""

                                                            +
                                                            +
                                                            +
                                                            + +
                                                            +
                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/VotingGraphComponent.html b/documentation/components/VotingGraphComponent.html new file mode 100644 index 00000000..06ac641b --- /dev/null +++ b/documentation/components/VotingGraphComponent.html @@ -0,0 +1,618 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                                                            +
                                                            + + +
                                                            +
                                                            + + + + + + + + +
                                                            +

                                                            +

                                                            File

                                                            +

                                                            +

                                                            + src/app/pages/voting/voting-graph/voting-graph.component.ts +

                                                            + + +

                                                            +

                                                            Extends

                                                            +

                                                            +

                                                            + BaseComponent +

                                                            + +

                                                            +

                                                            Implements

                                                            +

                                                            +

                                                            + OnInit +

                                                            + + +
                                                            +

                                                            Metadata

                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                            selectorframadate-voting-graph
                                                            styleUrls./voting-graph.component.scss
                                                            templateUrl./voting-graph.component.html
                                                            +
                                                            + +
                                                            +

                                                            Index

                                                            + + + + + + + + + + + + + + + + + + + + + +
                                                            +
                                                            Properties
                                                            +
                                                            + +
                                                            +
                                                            Methods
                                                            +
                                                            + +
                                                            +
                                                            + +
                                                            +

                                                            Constructor

                                                            + + + + + + + + + + + + + +
                                                            +constructor(config: ConfigService) +
                                                            + +
                                                            +
                                                            + Parameters : + + + + + + + + + + + + + + + + + + +
                                                            NameTypeOptional
                                                            config + ConfigService + + No +
                                                            +
                                                            +
                                                            +
                                                            + + + + + +
                                                            + +

                                                            + Methods +

                                                            + + + + + + + + + + + + + + + + + + + +
                                                            + + + + ngOnInit + + + +
                                                            +ngOnInit() +
                                                            + +
                                                            + +
                                                            + Returns : void + +
                                                            +
                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                            + + + + checkValidity + + + +
                                                            +checkValidity() +
                                                            +
                                                            Inherited from BaseComponent +
                                                            +
                                                            +
                                                            Defined in BaseComponent:21 +
                                                            +
                                                            + +
                                                            + Returns : boolean + +
                                                            +
                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                            + + + + displayErrorMessage + + + +
                                                            +displayErrorMessage() +
                                                            +
                                                            Inherited from BaseComponent +
                                                            +
                                                            +
                                                            Defined in BaseComponent:27 +
                                                            +
                                                            + +
                                                            + Returns : boolean + +
                                                            +
                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                            + + + + ngOnInit + + + +
                                                            +ngOnInit() +
                                                            +
                                                            Inherited from BaseComponent +
                                                            +
                                                            +
                                                            Defined in BaseComponent:17 +
                                                            +
                                                            + +
                                                            + Returns : void + +
                                                            +
                                                            +
                                                            +
                                                            + +

                                                            + Properties +

                                                            + + + + + + + + + + + + + + +
                                                            + + + + Public + config + + +
                                                            + Type : ConfigService + +
                                                            + +
                                                            + + + + + + + + + + + + + + + + + +
                                                            + + + + Public + config + + +
                                                            + Type : ConfigService + +
                                                            +
                                                            Inherited from BaseComponent +
                                                            +
                                                            +
                                                            Defined in BaseComponent:14 +
                                                            +
                                                            +
                                                            + +
                                                            + + +
                                                            +
                                                            import { Component, OnInit } from '@angular/core';
                                                            +import {BaseComponent} from "../../base-page/base.component";
                                                            +import {ConfigService} from "../../../services/config.service";
                                                            +
                                                            +@Component({
                                                            +  selector: 'framadate-voting-graph',
                                                            +  templateUrl: './voting-graph.component.html',
                                                            +  styleUrls: ['./voting-graph.component.scss']
                                                            +})
                                                            +export class VotingGraphComponent extends BaseComponent implements OnInit {
                                                            +
                                                            +    constructor(public config: ConfigService) {
                                                            +        super(config);
                                                            +    }
                                                            +
                                                            +    ngOnInit() {
                                                            +  }
                                                            +
                                                            +}
                                                            +
                                                            +
                                                            + +
                                                            +
                                                            <h1>Graphique</h1>
                                                            +<framadate-poll-graphic></framadate-poll-graphic>
                                                            +
                                                            +
                                                            + +
                                                            +

                                                            + ./voting-graph.component.scss +

                                                            +
                                                            +
                                                            + +
                                                            +
                                                            +
                                                            +
                                                            + Legend +
                                                            +
                                                            +
                                                            Html element +
                                                            +
                                                            +
                                                            Component +
                                                            +
                                                            +
                                                            Html element with directive +
                                                            +
                                                            +
                                                            + + +
                                                            + + + + + + + + + + + + + + + + + + + + + +
                                                            +
                                                            +

                                                            result-matching ""

                                                            +
                                                              +
                                                              +
                                                              +

                                                              No results matching ""

                                                              +
                                                              +
                                                              +
                                                              + +
                                                              +
                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/VotingNavigationComponent.html b/documentation/components/VotingNavigationComponent.html new file mode 100644 index 00000000..eac8dc67 --- /dev/null +++ b/documentation/components/VotingNavigationComponent.html @@ -0,0 +1,392 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                                                              +
                                                              + + +
                                                              +
                                                              + + + + + + + + +
                                                              +

                                                              +

                                                              File

                                                              +

                                                              +

                                                              + src/app/pages/voting/voting-navigation/voting-navigation.component.ts +

                                                              + + + + + +
                                                              +

                                                              Metadata

                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                              selectorframadate-voting-navigation
                                                              styleUrls./voting-navigation.component.scss
                                                              templateUrl./voting-navigation.component.html
                                                              +
                                                              + +
                                                              +

                                                              Index

                                                              + + + + + + + + + + + + + + + +
                                                              +
                                                              Properties
                                                              +
                                                              + +
                                                              +
                                                              + +
                                                              +

                                                              Constructor

                                                              + + + + + + + + + + + + + +
                                                              +constructor(config: ConfigService) +
                                                              + +
                                                              +
                                                              + Parameters : + + + + + + + + + + + + + + + + + + +
                                                              NameTypeOptional
                                                              config + ConfigService + + No +
                                                              +
                                                              +
                                                              +
                                                              + + + + + + +
                                                              + +

                                                              + Properties +

                                                              + + + + + + + + + + + + + + +
                                                              + + + + Public + config + + +
                                                              + Type : ConfigService + +
                                                              + +
                                                              +
                                                              + +
                                                              + + +
                                                              +
                                                              import {Component} from '@angular/core';
                                                              +import {ConfigService} from "../../../services/config.service";
                                                              +
                                                              +@Component({
                                                              +    selector: 'framadate-voting-navigation',
                                                              +    templateUrl: './voting-navigation.component.html',
                                                              +    styleUrls: ['./voting-navigation.component.scss']
                                                              +})
                                                              +export class VotingNavigationComponent {
                                                              +
                                                              +    constructor(public config: ConfigService) {
                                                              +    }
                                                              +
                                                              +}
                                                              +
                                                              +
                                                              + +
                                                              +
                                                              <nav id='navigation'>
                                                              +
                                                              +    <nav class='sections-nav' >
                                                              +        <ul >
                                                              +            <li >
                                                              +                <a href='#title' >
                                                              +                    {{config.currentPoll.poll.title}}
                                                              +                </a >
                                                              +            </li >
                                                              +            <li >
                                                              +                <a href='#table' >
                                                              +                    {{config.currentPoll.stacks.length}}
                                                              +                    votes
                                                              +                </a >
                                                              +            </li >
                                                              +            <li >
                                                              +                <a href='#graph' >
                                                              +                    Graphique
                                                              +                </a >
                                                              +            </li >
                                                              +            <li >
                                                              +                <a href='#comments' >
                                                              +                    <i class='fa fa-comments' ></i >
                                                              +                    <span
                                                              +                        *ngIf='config.currentPoll && config.currentPoll.comments'
                                                              +                        class='comments-count' >
                                                              +                            {{config.currentPoll.comments.length}}
                                                              +                        </span >
                                                              +                    commentaires
                                                              +                </a >
                                                              +            </li >
                                                              +        </ul >
                                                              +    </nav >
                                                              +</nav>
                                                              +
                                                              +
                                                              + +
                                                              +

                                                              + ./voting-navigation.component.scss +

                                                              +
                                                              +
                                                              + +
                                                              +
                                                              +
                                                              +
                                                              + Legend +
                                                              +
                                                              +
                                                              Html element +
                                                              +
                                                              +
                                                              Component +
                                                              +
                                                              +
                                                              Html element with directive +
                                                              +
                                                              +
                                                              + + +
                                                              + + + + + + + + + + + + + + + + + + + + + +
                                                              +
                                                              +

                                                              result-matching ""

                                                              +
                                                                +
                                                                +
                                                                +

                                                                No results matching ""

                                                                +
                                                                +
                                                                +
                                                                + +
                                                                +
                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/VotingSummaryComponent.html b/documentation/components/VotingSummaryComponent.html new file mode 100644 index 00000000..08354016 --- /dev/null +++ b/documentation/components/VotingSummaryComponent.html @@ -0,0 +1,837 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                                                                +
                                                                + + +
                                                                +
                                                                + + + + + + + + +
                                                                +

                                                                +

                                                                File

                                                                +

                                                                +

                                                                + src/app/pages/voting/voting-summary/voting-summary.component.ts +

                                                                + + + +

                                                                +

                                                                Implements

                                                                +

                                                                +

                                                                + OnInit +

                                                                + + +
                                                                +

                                                                Metadata

                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                selectorframadate-voting-summary
                                                                styleUrls./voting-summary.component.scss
                                                                templateUrl./voting-summary.component.html
                                                                +
                                                                + +
                                                                +

                                                                Index

                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                +
                                                                Properties
                                                                +
                                                                + +
                                                                +
                                                                Methods
                                                                +
                                                                + +
                                                                +
                                                                Inputs
                                                                +
                                                                + +
                                                                +
                                                                + +
                                                                +

                                                                Constructor

                                                                + + + + + + + + + + + + + +
                                                                +constructor(config: ConfigService) +
                                                                + +
                                                                +
                                                                + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                NameTypeOptional
                                                                config + ConfigService + + No +
                                                                +
                                                                +
                                                                +
                                                                + +
                                                                +

                                                                Inputs

                                                                + + + + + + + + + + + + +
                                                                + + pollconfig +
                                                                + Default value : mockPoll3 +
                                                                + +
                                                                +
                                                                + + + +
                                                                + +

                                                                + Methods +

                                                                + + + + + + + + + + + + + + + + + + + +
                                                                + + + + computePreferred + + + +
                                                                +computePreferred() +
                                                                + +
                                                                +

                                                                find the most "yes"

                                                                +
                                                                + +
                                                                + Returns : void + +
                                                                +
                                                                + + + + + + + + + + + + + + + + + + + +
                                                                + + + + getKeys + + + +
                                                                +getKeys(obj) +
                                                                + +
                                                                + +
                                                                + Parameters : + + + + + + + + + + + + + + + + +
                                                                NameOptional
                                                                obj + No +
                                                                +
                                                                +
                                                                +
                                                                +
                                                                + Returns : any + +
                                                                +
                                                                + +
                                                                +
                                                                + + + + + + + + + + + + + + + + + + + +
                                                                + + + + ngOnInit + + + +
                                                                +ngOnInit() +
                                                                + +
                                                                + +
                                                                + Returns : void + +
                                                                +
                                                                +
                                                                +
                                                                + +

                                                                + Properties +

                                                                + + + + + + + + + + + + + + +
                                                                + + + + Public + config + + +
                                                                + Type : ConfigService + +
                                                                + +
                                                                + + + + + + + + + + + + + + + + + +
                                                                + + + + preferred + + +
                                                                + Type : string + +
                                                                + Default value : 'rien' +
                                                                + +
                                                                + + + + + + + + + + + + + + + + + +
                                                                + + + + severalPreferred + + +
                                                                + Type : boolean + +
                                                                + Default value : false +
                                                                + +
                                                                +
                                                                + +
                                                                + + +
                                                                +
                                                                import {Component, Input, OnInit} from '@angular/core';
                                                                +import {ConfigService} from "../../../services/config.service";
                                                                +import {mockPoll3} from "../../../config/mocks/mock-poll3";
                                                                +
                                                                +@Component({
                                                                +    selector: 'framadate-voting-summary',
                                                                +    templateUrl: './voting-summary.component.html',
                                                                +    styleUrls: ['./voting-summary.component.scss']
                                                                +})
                                                                +export class VotingSummaryComponent implements OnInit {
                                                                +
                                                                +    preferred: string = 'rien';
                                                                +    severalPreferred: boolean = false;
                                                                +
                                                                +    @Input() pollconfig = mockPoll3;
                                                                +
                                                                +    constructor(public config: ConfigService) {
                                                                +
                                                                +    }
                                                                +
                                                                +    ngOnInit() {
                                                                +        this.computePreferred();
                                                                +        console.log(' this.pollconfig.choices', this.pollconfig.choices)
                                                                +        console.log(' this.pollconfig.choices_count', this.pollconfig.choices_count.counts)
                                                                +        console.log('this.pollconfig.choices_count.counts[10]', this.pollconfig.choices_count.counts[10])
                                                                +        console.log('this.pollconfig.choices[2].id', this.pollconfig.choices[2].id)
                                                                +        console.log('this.pollconfig.choices_count.counts[]', this.pollconfig.choices_count.counts[this.pollconfig.choices[2].id].score)
                                                                +    }
                                                                +
                                                                +    getKeys(obj) {
                                                                +        return Object.keys(obj)
                                                                +    }
                                                                +
                                                                +    /**
                                                                +     * find the most "yes"
                                                                +     */
                                                                +    computePreferred() {
                                                                +        let keys = Object.keys(this.pollconfig.choices_count.counts);
                                                                +        this.preferred = '';
                                                                +        this.severalPreferred = false;
                                                                +        let maxScore = this.pollconfig.choices_count.maxScore;
                                                                +
                                                                +        keys.forEach(item => {
                                                                +            if (maxScore === this.pollconfig.choices_count.counts[item].score) {
                                                                +                if (this.preferred.length) {
                                                                +                    this.preferred += ', '
                                                                +                    this.severalPreferred = true;
                                                                +                }
                                                                +                // find the favourite
                                                                +                this.preferred += this.pollconfig.choices_count.counts[item].choice_text;
                                                                +            }
                                                                +
                                                                +        });
                                                                +
                                                                +    }
                                                                +
                                                                +
                                                                +}
                                                                +
                                                                +
                                                                + +
                                                                +
                                                                <h2 >Résumé</h2 >
                                                                +<div class='heading' >
                                                                +    <div class='col-xs-6' >
                                                                +        <h1 id='title' >{{config.currentPoll.poll.title}}</h1 >
                                                                +        <p >{{config.currentPoll.poll.description}}</p >
                                                                +        <span class="creationDate" >
                                                                +                Créé le {{config.currentPoll.poll.creationDate.date}}
                                                                +            </span >
                                                                +        <span class="expiracyDate" >
                                                                +                Expire le {{config.currentPoll.poll.expiracyDate.date}}
                                                                +            </span >
                                                                +        <div class="votants" >
                                                                +            <i class='fa fa-users' ></i >
                                                                +            {{config.currentPoll.stacks.length}} votants,
                                                                +            {{config.currentPoll.choices.length}} choix,
                                                                +        </div >
                                                                +    </div >
                                                                +</div >
                                                                +<div class="preferred" >
                                                                +    <i class='fa fa-star' ></i >
                                                                +    Pour l'instant,
                                                                +    <span *ngIf='severalPreferred' >
                                                                +        les
                                                                +    </span > <span *ngIf='!severalPreferred' >
                                                                +        le
                                                                +    </span >
                                                                +    choix ayant reçu le plus grand nombre de votes ( {{config.currentPoll.choices_count.maxScore}} points )
                                                                +    <span *ngIf='severalPreferred' >
                                                                +        sont à égalité
                                                                +    </span > <span *ngIf='!severalPreferred' >
                                                                +        est
                                                                +    </span >
                                                                +    :
                                                                +    <span class='preferred-result' >
                                                                +    {{preferred}}
                                                                +    </span >
                                                                +</div >
                                                                +<table class='table is-striped is-bordered is-hoverable' >
                                                                +    <thead >
                                                                +    <tr *ngIf='config.currentPoll.choices && config.currentPoll.choices_count' >
                                                                +        <td >
                                                                +            Pseudo
                                                                +        </td >
                                                                +        <td
                                                                +            *ngFor='let choice of config.currentPoll.choices'
                                                                +
                                                                +        >
                                                                +            {{choice.text}}
                                                                +        </td >
                                                                +    </tr >
                                                                +    <!--    somme des points, dont un demi point pour les "peut être" -->
                                                                +
                                                                +    </thead >
                                                                +    <tbody >
                                                                +    <tr
                                                                +
                                                                +        title='somme des points, dont un demi point pour les "peut être"' >
                                                                +        <td >
                                                                +            <i class='fa fa-plus-circle' ></i > points
                                                                +        </td >
                                                                +        <!--        <td-->
                                                                +        <!--            *ngFor='let choice of config.currentPoll.choices'-->
                                                                +        <!--            [ngClass]='{"has-max-score" : config.currentPoll.choices_count.maxScore === config.currentPoll.choices_count.counts[choice.id].score}' >-->
                                                                +        <!--            {{config.currentPoll.choices[choice.id].score}}-->
                                                                +        <!--        </td >-->
                                                                +        <td
                                                                +            *ngFor='let choice of config.currentPoll.choices'
                                                                +        >
                                                                +            {{pollconfig.choices_count.counts[this.pollconfig.choices[2].id].score}}
                                                                +        </td >
                                                                +    </tr >
                                                                +    <tr class='details' >
                                                                +        <td >
                                                                +            <i class='fa fa-eye' ></i >
                                                                +        </td >
                                                                +        <td *ngFor='let choice of config.currentPoll.choices' >
                                                                +            id: {{choice.id}}
                                                                +            <br >
                                                                +            <!--            yes {{config.currentPoll.choices_count.counts[choice.id].yes.count}}-->
                                                                +            <!--            <br >-->
                                                                +            <!--            maybe-->
                                                                +            <!--            {{(config.currentPoll.choices_count.counts[k].yes.maybe ? config.currentPoll.choices_count.counts[k].yes.count * 0.5 : 0)}}-->
                                                                +
                                                                +            <!--            <br >-->
                                                                +            <!--            no {{(config.currentPoll.choices_count.counts[k].yes.maybe ? config.currentPoll.choices_count.counts[k].maybe.count * 0.5 : 0)}}-->
                                                                +            <br >
                                                                +            <!--            score :-->
                                                                +            <!--            {{(config.currentPoll.choices_count.counts[choice.id].score)}}-->
                                                                +
                                                                +        </td >
                                                                +    </tr >
                                                                +    <tr
                                                                +        class='votes-of-the-person'
                                                                +        *ngFor='let voteStack of config.currentPoll.stacks'
                                                                +    >
                                                                +        <td >
                                                                +            <!--            // TODO show modify if this is our own vote-->
                                                                +
                                                                +            <button
                                                                +                (click)='config.loadVoteStack(voteStack)'
                                                                +                *ngIf="config.currentPoll.poll.modificationPolicy === 'everybody'"
                                                                +                class='btn btn--primary pull-left btn--small'
                                                                +            >
                                                                +                <i class='fa fa-pencil' ></i >
                                                                +            </button >
                                                                +
                                                                +            {{voteStack.pseudo}}
                                                                +        </td >
                                                                +        <td *ngFor='let v of getKeys(voteStack.votes)' >
                                                                +            <span *ngIf='voteStack.votes[v].value' >
                                                                +
                                                                +                <img
                                                                +                    *ngIf="voteStack.votes[v].value == 'yes'"
                                                                +                    src='../../../../assets/img/votant-sur.svg'
                                                                +                    alt='yes' >
                                                                +                <img
                                                                +                    *ngIf="voteStack.votes[v].value == 'maybe'"
                                                                +                    src='../../../../assets/img/votant-pas-sur.svg'
                                                                +                    alt='yes' >
                                                                +            </span >
                                                                +        </td >
                                                                +    </tr >
                                                                +    <!--    bottom line shows each answer details-->
                                                                +
                                                                +    </tbody >
                                                                +</table >
                                                                +
                                                                +
                                                                + +
                                                                +

                                                                + ./voting-summary.component.scss +

                                                                +
                                                                @import "../../../../assets/scss/variables";
                                                                +
                                                                +.person {
                                                                +    font-weight: 700;
                                                                +}
                                                                +
                                                                +.preferred-result {
                                                                +    font-weight: 700;
                                                                +    font-size: 1.5em;
                                                                +}
                                                                +
                                                                +thead {
                                                                +    font-size: 1.25em;
                                                                +    font-weight: 700;
                                                                +}
                                                                +
                                                                +tbody {
                                                                +    text-align: right;
                                                                +}
                                                                +
                                                                +td {
                                                                +    &.has-max-score {
                                                                +        background: $primary_color;
                                                                +        font-weight: 800;
                                                                +    }
                                                                +}
                                                                +
                                                                +
                                                                + +
                                                                +
                                                                +
                                                                +
                                                                + Legend +
                                                                +
                                                                +
                                                                Html element +
                                                                +
                                                                +
                                                                Component +
                                                                +
                                                                +
                                                                Html element with directive +
                                                                +
                                                                +
                                                                + + +
                                                                + + + + + + + + + + + + + + + + + + + + + +
                                                                +
                                                                +

                                                                result-matching ""

                                                                +
                                                                  +
                                                                  +
                                                                  +

                                                                  No results matching ""

                                                                  +
                                                                  +
                                                                  +
                                                                  + +
                                                                  +
                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/coverage.html b/documentation/coverage.html new file mode 100644 index 00000000..5d3bb9f8 --- /dev/null +++ b/documentation/coverage.html @@ -0,0 +1,1084 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                                                                  +
                                                                  + + +
                                                                  +
                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                  + +
                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                  FileTypeIdentifierStatements
                                                                  + + e2e/src/app.po.ts + classAppPage + 0 % + (0/3) +
                                                                  + + src/app/app.component.ts + componentAppComponent + 6 % + (1/15) +
                                                                  + + src/app/app.module.ts + classMyMissingTranslationHandler + 0 % + (0/2) +
                                                                  + + src/app/app.module.ts + functionHttpLoaderFactory + 0 % + (0/1) +
                                                                  + + src/app/config/DateUtilities.ts + injectableDateUtilities + 50 % + (3/6) +
                                                                  + + src/app/config/PollConfig.ts + classPollConfig + 2 % + (1/40) +
                                                                  + + src/app/config/PollConfig.ts + interfaceDateOption + 0 % + (0/4) +
                                                                  + + src/app/config/PollConfig.ts + variablebaseConfigValues + 0 % + (0/1) +
                                                                  + + src/app/config/PollUtilities.ts + injectablePollUtilities + 75 % + (3/4) +
                                                                  + + src/app/config/Routes.ts + variableRoutes + 100 % + (1/1) +
                                                                  + + src/app/config/defaultConfigs.ts + interfaceDateChoice + 0 % + (0/4) +
                                                                  + + src/app/config/defaultConfigs.ts + interfacePollAnswer + 0 % + (0/8) +
                                                                  + + src/app/config/defaultConfigs.ts + interfaceTimeSlices + 0 % + (0/2) +
                                                                  + + src/app/config/defaultConfigs.ts + variablebasicSlicesOfDay + 0 % + (0/1) +
                                                                  + + src/app/config/defaultConfigs.ts + variablecurrentDay + 0 % + (0/1) +
                                                                  + + src/app/config/defaultConfigs.ts + variablecurrentMonth + 0 % + (0/1) +
                                                                  + + src/app/config/defaultConfigs.ts + variablecurrentYear + 0 % + (0/1) +
                                                                  + + src/app/config/defaultConfigs.ts + variabledefaultAnswers + 0 % + (0/1) +
                                                                  + + src/app/config/defaultConfigs.ts + variabledefaultDates + 0 % + (0/1) +
                                                                  + + src/app/config/defaultConfigs.ts + variabledefaultTimeOfDay + 0 % + (0/1) +
                                                                  + + src/app/config/defaultConfigs.ts + variableotherDefaultDates + 0 % + (0/1) +
                                                                  + + src/app/config/defaultConfigs.ts + variableotherSlicesOfDay + 0 % + (0/1) +
                                                                  + + src/app/config/defaultConfigs.ts + variableotherTimeOfDay + 0 % + (0/1) +
                                                                  + + src/app/config/graph-canevas-options.ts + variablegraphOptions + 0 % + (0/1) +
                                                                  + + src/app/config/mocks/choice.ts + variablemockChoice + 0 % + (0/1) +
                                                                  + + src/app/config/mocks/mock-comments.ts + variablemockComments + 0 % + (0/1) +
                                                                  + + src/app/config/mocks/mock-graph.ts + variablemockGraphConfig + 0 % + (0/1) +
                                                                  + + src/app/config/mocks/mock-poll3.ts + variablemockPoll3 + 0 % + (0/1) +
                                                                  + + src/app/config/mocks/mock-success-vote.ts + variablemockSuccessVote + 0 % + (0/1) +
                                                                  + + src/app/config/mocks/mockmypolls.ts + variablemockMyPolls + 0 % + (0/1) +
                                                                  + + src/app/custom-lib/date-value-accessor/date-value-accessor.ts + directiveDateValueAccessor + 12 % + (1/8) +
                                                                  + + src/app/custom-lib/date-value-accessor/date-value-accessor.ts + variableDATE_VALUE_ACCESSOR + 0 % + (0/1) +
                                                                  + + src/app/debugger/debugger.component.ts + componentDebuggerComponent + 0 % + (0/7) +
                                                                  + + src/app/header/header.component.ts + componentHeaderComponent + 0 % + (0/3) +
                                                                  + + src/app/pages/admin/admin.component.ts + componentAdminComponent + 0 % + (0/4) +
                                                                  + + src/app/pages/answers/answers.component.ts + componentAnswersComponent + 0 % + (0/20) +
                                                                  + + src/app/pages/base-page/base.component.ts + componentBaseComponent + 0 % + (0/6) +
                                                                  + + src/app/pages/create-or-retrieve/create-or-retrieve.component.ts + componentCreateOrRetrieveComponent + 0 % + (0/11) +
                                                                  + + src/app/pages/dates/dates.component.ts + componentDatesComponent + 23 % + (5/21) +
                                                                  + + src/app/pages/end-confirmation/end-confirmation.component.ts + componentEndConfirmationComponent + 0 % + (0/12) +
                                                                  + + src/app/pages/home/home.component.ts + componentHomeComponent + 0 % + (0/9) +
                                                                  + + src/app/pages/kind/kind.component.ts + componentKindComponent + 0 % + (0/8) +
                                                                  + + src/app/pages/password/password.component.ts + componentPasswordComponent + 0 % + (0/8) +
                                                                  + + src/app/pages/pictures/pictures.component.ts + componentPicturesComponent + 0 % + (0/8) +
                                                                  + + src/app/pages/poll-display/poll-display.component.ts + componentPollDisplayComponent + 0 % + (0/11) +
                                                                  + + src/app/pages/resume/resume.component.ts + componentResumeComponent + 0 % + (0/7) +
                                                                  + + src/app/pages/visibility/visibility.component.ts + componentVisibilityComponent + 0 % + (0/13) +
                                                                  + + src/app/pages/voting/choices-list/choices-list.component.ts + componentChoicesListComponent + 0 % + (0/3) +
                                                                  + + src/app/pages/voting/comments-list/comments-list.component.ts + componentCommentsListComponent + 0 % + (0/3) +
                                                                  + + src/app/pages/voting/voting-choice/voting-choice.component.ts + componentVotingChoiceComponent + 10 % + (1/10) +
                                                                  + + src/app/pages/voting/voting-choice/voting-choice.component.ts + interfaceVoteChoice + 0 % + (0/7) +
                                                                  + + src/app/pages/voting/voting-comment/voting-comment.component.ts + componentVotingCommentComponent + 0 % + (0/4) +
                                                                  + + src/app/pages/voting/voting-graph/voting-graph.component.ts + componentVotingGraphComponent + 0 % + (0/8) +
                                                                  + + src/app/pages/voting/voting-navigation/voting-navigation.component.ts + componentVotingNavigationComponent + 0 % + (0/3) +
                                                                  + + src/app/pages/voting/voting-summary/voting-summary.component.ts + componentVotingSummaryComponent + 11 % + (1/9) +
                                                                  + + src/app/pages/voting/voting.component.ts + componentVotingComponent + 0 % + (0/4) +
                                                                  + + src/app/poll-graphic/poll-graphic.component.ts + componentPollGraphicComponent + 0 % + (0/15) +
                                                                  + + src/app/services/config.service.ts + injectableConfigService + 25 % + (18/72) +
                                                                  + + src/app/services/poll.service.ts + injectablePollService + 0 % + (0/3) +
                                                                  + + src/app/ui/copy-text/copy-text.component.ts + componentCopyTextComponent + 0 % + (0/5) +
                                                                  + + src/app/ui/directives/resettable-input.directive.ts + directiveResettableInputDirective + 50 % + (1/2) +
                                                                  + + src/app/ui/erasable-input/erasable-input.component.ts + componentErasableInputComponent + 0 % + (0/6) +
                                                                  + + src/app/ui/navigation/navigation.component.ts + componentNavigationComponent + 0 % + (0/11) +
                                                                  + + src/app/ui/selector/selector.component.ts + componentSelectorComponent + 0 % + (0/4) +
                                                                  + + src/app/ui/selector/selector.component.ts + interfaceItem + 0 % + (0/3) +
                                                                  + + src/app/ui/selector/selector.component.ts + interfaceSelectorConfig + 0 % + (0/6) +
                                                                  + + src/environments/environment.prod.ts + variableenvironment + 0 % + (0/1) +
                                                                  + + src/environments/environment.ts + variableapiVersion + 0 % + (0/1) +
                                                                  + + src/environments/environment.ts + variablebaseURL + 0 % + (0/1) +
                                                                  + + src/environments/environment.ts + variablebaseURLDemo + 0 % + (0/1) +
                                                                  + + src/environments/environment.ts + variablebaseURLProd + 0 % + (0/1) +
                                                                  + + src/environments/environment.ts + variableenvironment + 0 % + (0/1) +
                                                                  + + src/environments/environment.ts + variabletestOnDemo + 0 % + (0/1) +
                                                                  + + src/stories/0-Welcome.stories.ts + variableToStorybook + 0 % + (0/1) +
                                                                  + + src/stories/1-Button.stories.ts + variableButtonWithLinkToAnotherStory + 0 % + (0/1) +
                                                                  + + src/stories/1-Button.stories.ts + variableEmoji + 0 % + (0/1) +
                                                                  + + src/stories/1-Button.stories.ts + variableText + 0 % + (0/1) +
                                                                  + + src/stories/1-Button.stories.ts + variableWithSomeEmojiAndAction + 0 % + (0/1) +
                                                                  + + src/test.ts + variablecontext + 0 % + (0/1) +
                                                                  + + src/test.ts + variablerequire + 0 % + (0/1) +
                                                                  + + + + + +
                                                                  +
                                                                  +

                                                                  result-matching ""

                                                                  +
                                                                    +
                                                                    +
                                                                    +

                                                                    No results matching ""

                                                                    +
                                                                    +
                                                                    +
                                                                    + +
                                                                    +
                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/dependencies.html b/documentation/dependencies.html new file mode 100644 index 00000000..5a0088de --- /dev/null +++ b/documentation/dependencies.html @@ -0,0 +1,165 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                                                                    +
                                                                    + + +
                                                                    +
                                                                    + + + + + + + + + + + + + + + +
                                                                      +
                                                                    • + @angular/animations : ^9.0.0
                                                                    • +
                                                                    • + @angular/cdk : ^9.0.0
                                                                    • +
                                                                    • + @angular/common : ~9.0.0
                                                                    • +
                                                                    • + @angular/compiler : ~9.0.0
                                                                    • +
                                                                    • + @angular/core : ~9.0.0
                                                                    • +
                                                                    • + @angular/forms : ~9.0.0
                                                                    • +
                                                                    • + @angular/localize : ^9.0.0
                                                                    • +
                                                                    • + @angular/platform-browser : ~9.0.0
                                                                    • +
                                                                    • + @angular/platform-browser-dynamic : ~9.0.0
                                                                    • +
                                                                    • + @angular/router : ~9.0.0
                                                                    • +
                                                                    • + @fullcalendar/core : ^4.3.1
                                                                    • +
                                                                    • + @ngx-translate/core : ^12.0.0
                                                                    • +
                                                                    • + @ngx-translate/http-loader : ^4.0.0
                                                                    • +
                                                                    • + angular-date-value-accessor : ^0.0.2
                                                                    • +
                                                                    • + bulma : ^0.8.0
                                                                    • +
                                                                    • + chart.js : ^2.8.0
                                                                    • +
                                                                    • + font-awesome : ^4.7.0
                                                                    • +
                                                                    • + karma-coverage : ^2.0.1
                                                                    • +
                                                                    • + karma-firefox-launcher : ^1.3.0
                                                                    • +
                                                                    • + karma-phantomjs-launcher : ^1.0.4
                                                                    • +
                                                                    • + ngx-clipboard : ^12.3.0
                                                                    • +
                                                                    • + ngx-markdown : ^8.2.2
                                                                    • +
                                                                    • + ngx-toaster : ^1.0.1
                                                                    • +
                                                                    • + primeicons : ^2.0.0
                                                                    • +
                                                                    • + primeng : ^9.0.0-rc.2
                                                                    • +
                                                                    • + quill : ^1.3.7
                                                                    • +
                                                                    • + rxjs : ~6.5.4
                                                                    • +
                                                                    • + rxjs-compat : ^6.5.3
                                                                    • +
                                                                    • + tslib : ^1.10.0
                                                                    • +
                                                                    • + zone.js : ~0.10.2
                                                                    • +
                                                                    + + + + + + +
                                                                    +
                                                                    +

                                                                    result-matching ""

                                                                    +
                                                                      +
                                                                      +
                                                                      +

                                                                      No results matching ""

                                                                      +
                                                                      +
                                                                      +
                                                                      + +
                                                                      +
                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/DateValueAccessor.html b/documentation/directives/DateValueAccessor.html new file mode 100644 index 00000000..89bf0153 --- /dev/null +++ b/documentation/directives/DateValueAccessor.html @@ -0,0 +1,696 @@ + + + + + + framadate-funky-frontend documentation + + + + + + + + + + + + +
                                                                      +
                                                                      + + +
                                                                      +
                                                                      + + + + + + + + + + +
                                                                      +
                                                                      +

                                                                      +

                                                                      File

                                                                      +

                                                                      +

                                                                      + src/app/custom-lib/date-value-accessor/date-value-accessor.ts +

                                                                      + +

                                                                      +

                                                                      Description

                                                                      +

                                                                      +

                                                                      +

                                                                      The accessor for writing a value and listening to changes on a date input element

                                                                      +

                                                                      Example

                                                                      +

                                                                      <input type="date" name="myBirthday" ngModel useValueAsDate>

                                                                      + +

                                                                      + +

                                                                      +

                                                                      Implements

                                                                      +

                                                                      +

                                                                      + ControlValueAccessor +

                                                                      + + +
                                                                      +

                                                                      Metadata

                                                                      + + + + + + + + + + + + + +
                                                                      Providers + + DATE_VALUE_ACCESSOR + +
                                                                      Selector[useValueAsDate]
                                                                      +
                                                                      + +
                                                                      +

                                                                      Index

                                                                      + + + + + + + + + + + + + + + + + + + + + +
                                                                      +
                                                                      Methods
                                                                      +
                                                                      + +
                                                                      +
                                                                      HostListeners
                                                                      +
                                                                      + +
                                                                      +
                                                                      + +
                                                                      +

                                                                      Constructor

                                                                      + + + + + + + + + + + + + +
                                                                      +constructor(_renderer: Renderer2, _elementRef: ElementRef) +
                                                                      + +
                                                                      +
                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                      NameTypeOptional
                                                                      _renderer + Renderer2 + + No +
                                                                      _elementRef + ElementRef + + No +
                                                                      +
                                                                      +
                                                                      +
                                                                      + + + + +
                                                                      +

                                                                      HostListeners

                                                                      + + + + + + + + + + + + + + + +
                                                                      + + + + blur + + + +
                                                                      +blur() +
                                                                      + +
                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                      + + + + input + + + +
                                                                      + Arguments : '$event.target.valueAsDate' +
                                                                      +input() +
                                                                      + +
                                                                      +
                                                                      +
                                                                      + +

                                                                      + Methods +

                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                      + + + + registerOnChange + + + +
                                                                      +registerOnChange(fn: (_: any) => void) +
                                                                      + +
                                                                      + +
                                                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                      NameTypeOptional
                                                                      fn + function + + No +
                                                                      +
                                                                      +
                                                                      +
                                                                      +
                                                                      + Returns : void + +
                                                                      +
                                                                      + +
                                                                      +
                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                      + + + + registerOnTouched + + + +
                                                                      +registerOnTouched(fn: () => void) +
                                                                      + +
                                                                      + +
                                                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                      NameTypeOptional
                                                                      fn + function + + No +
                                                                      +
                                                                      +
                                                                      +
                                                                      +
                                                                      + Returns : void + +
                                                                      +
                                                                      + +
                                                                      +
                                                                      + + + + + + + + + + + + + + + + +
                                                                      + + + + setDisabledState + + + +
                                                                      +setDisabledState(isDisabled: boolean) +
                                                                      + +
                                                                      + +
                                                                      + Parameters : + +