<commit_before>/*
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * External dependencies
 */
import {
  addRequestInterception,
  publishPost,
  withDisabledToolbarOnFrontend,
  insertBlock,
  withPlugin,
  createNewPost,
  setPostContent,
} from '@web-stories-wp/e2e-test-utils';
import percySnapshot from '@percy/puppeteer';
/**
 * Internal dependencies
 */
import { addAllowedErrorMessage } from '../../config/bootstrap';

const EMBED_BLOCK_CONTENT = `

<amp-story-player style="width:360px;height:600px" data-testid="amp-story-player">Stories in AMP - Hello World</amp-story-player>

`;

describe('Web Stories Block', () => {
  let stopRequestInterception;
  let removeErrorMessage;

  beforeAll(async () => {
    removeErrorMessage = addAllowedErrorMessage(
      'Failed to load resource: the server responded with a status of 404'
    );
    await page.setRequestInterception(true);
    stopRequestInterception = addRequestInterception((request) => {
      // amp-story-player scripts
      if (request.url().startsWith('https://cdn.ampproject.org/')) {
        request.respond({
          status: 200,
          body: '',
        });
        return;
      }

      // Fetching metadata for the story.
      if (request.url().includes('web-stories/v1/embed')) {
        request.respond({
          status: 200,
          body: '{"title":"Stories in AMP - Hello World","poster":"https:\\/\\/amp.dev\\/static\\/samples\\/img\\/story_dog2_portrait.jpg"}',
        });
        return;
      }

      request.continue();
    });
  });

  afterAll(async () => {
    await page.setRequestInterception(false);
    stopRequestInterception();
    removeErrorMessage();
  });

  it('should insert a new web stories block', async () => {
    await createNewPost({
      showWelcomeGuide: false,
    });
    await insertBlock('Web Stories');

    await page.waitForSelector('.web-stories-block-configuration-panel');

    await expect(page).toClick('button', { text: 'Story URL' });

    await page.type(
      'input[aria-label="Story URL"]',
      'https://preview.amp.dev/documentation/examples/introduction/stories_in_amp'
    );
    await expect(page).toClick('button', { text: 'Embed' });

    await expect(page).not.toMatch(
      'Sorry, this content could not be embedded.'
    );

    // Wait a little longer for embed REST API request to come back.
    await page.waitForSelector('amp-story-player');
    await expect(page).toMatchElement('amp-story-player');
    await expect(page).toMatch('Embed Settings');
  });

  it('should insert a new web stories block and select story', async () => {
    await createNewPost({
      showWelcomeGuide: false,
    });
    await insertBlock('Web Stories');

    await page.waitForSelector('.web-stories-block-configuration-panel');

    await expect(page).toClick('button', { text: 'Selected Stories' });

    await expect(page).toClick('button', { text: 'Box Carousel' });

    await expect(page).toClick('button', { text: 'Select Stories' });

    await page.waitForSelector('.components-modal__screen-overlay');
    await expect(page).toMatchElement('.components-modal__screen-overlay');
    await percySnapshot(page, 'Story select modal');
  });
  // Disable for https://github.com/google/web-stories-wp/issues/6237
  // eslint-disable-next-line jest/no-disabled-tests
  describe.skip('AMP validation', () => {
    withDisabledToolbarOnFrontend();
    withPlugin('amp');

    it('should produce valid AMP when using the AMP plugin', async () => {
      await createNewPost({
        showWelcomeGuide: false,
      });

      await setPostContent(EMBED_BLOCK_CONTENT);

      const postPermalink = await publishPost();

      expect(postPermalink).not.toBeNull();
      expect(postPermalink).toStrictEqual(expect.any(String));

      const ampPostPermaLink = postPermalink.includes('?')
        ? `${postPermalink}&amp`
        : `${postPermalink}?amp`;

      await page.goto(ampPostPermaLink, {
        waitUntil: 'networkidle0',
      });

      await page.waitForSelector('amp-story-player');
      await expect(page).toMatchElement('amp-story-player');

      await expect(page).toBeValidAMP();
    });
  });
});
<commit_msg>E2E Tests: fix flakey snapshot in Selected Stories block (#8582)<commit_after>/*
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * External dependencies
 */
import {
  addRequestInterception,
  publishPost,
  withDisabledToolbarOnFrontend,
  insertBlock,
  withPlugin,
  createNewPost,
  setPostContent,
} from '@web-stories-wp/e2e-test-utils';
import percySnapshot from '@percy/puppeteer';
/**
 * Internal dependencies
 */
import { addAllowedErrorMessage } from '../../config/bootstrap';

const EMBED_BLOCK_CONTENT = `

<amp-story-player style="width:360px;height:600px" data-testid="amp-story-player">Stories in AMP - Hello World</amp-story-player>

`;

describe('Web Stories Block', () => {
  let stopRequestInterception;
  let removeErrorMessage;

  beforeAll(async () => {
    removeErrorMessage = addAllowedErrorMessage(
      'Failed to load resource: the server responded with a status of 404'
    );
    await page.setRequestInterception(true);
    stopRequestInterception = addRequestInterception((request) => {
      // amp-story-player scripts
      if (request.url().startsWith('https://cdn.ampproject.org/')) {
        request.respond({
          status: 200,
          body: '',
        });
        return;
      }

      // Fetching metadata for the story.
      if (request.url().includes('web-stories/v1/embed')) {
        request.respond({
          status: 200,
          body: '{"title":"Stories in AMP - Hello World","poster":"https:\\/\\/amp.dev\\/static\\/samples\\/img\\/story_dog2_portrait.jpg"}',
        });
        return;
      }

      request.continue();
    });
  });

  afterAll(async () => {
    await page.setRequestInterception(false);
    stopRequestInterception();
    removeErrorMessage();
  });

  it('should insert a new web stories block', async () => {
    await createNewPost({
      showWelcomeGuide: false,
    });
    await insertBlock('Web Stories');

    await page.waitForSelector('.web-stories-block-configuration-panel');

    await expect(page).toClick('button', { text: 'Story URL' });

    await page.type(
      'input[aria-label="Story URL"]',
      'https://preview.amp.dev/documentation/examples/introduction/stories_in_amp'
    );
    await expect(page).toClick('button', { text: 'Embed' });

    await expect(page).not.toMatch(
      'Sorry, this content could not be embedded.'
    );

    // Wait a little longer for embed REST API request to come back.
    await page.waitForSelector('amp-story-player');
    await expect(page).toMatchElement('amp-story-player');
    await expect(page).toMatch('Embed Settings');
  });

  it('should insert a new web stories block and select story', async () => {
    await createNewPost({
      showWelcomeGuide: false,
    });
    await insertBlock('Web Stories');

    await page.waitForSelector('.web-stories-block-configuration-panel');

    await expect(page).toClick('button', { text: 'Selected Stories' });

    await expect(page).toClick('button', { text: 'Box Carousel' });

    await expect(page).toClick('button', { text: 'Select Stories' });

    await page.waitForSelector('.components-modal__screen-overlay');
    await expect(page).toMatchElement('.components-modal__screen-overlay');

    await page.waitForFunction(
      () => !document.querySelector('.components-spinner')
    );

    await percySnapshot(page, 'Story select modal');
  });

  // Disable for https://github.com/google/web-stories-wp/issues/6237
  // eslint-disable-next-line jest/no-disabled-tests
  describe.skip('AMP validation', () => {
    withDisabledToolbarOnFrontend();
    withPlugin('amp');

    it('should produce valid AMP when using the AMP plugin', async () => {
      await createNewPost({
        showWelcomeGuide: false,
      });

      await setPostContent(EMBED_BLOCK_CONTENT);

      const postPermalink = await publishPost();

      expect(postPermalink).not.toBeNull();
      expect(postPermalink).toStrictEqual(expect.any(String));

      const ampPostPermaLink = postPermalink.includes('?')
        ? `${postPermalink}&amp`
        : `${postPermalink}?amp`;

      await page.goto(ampPostPermaLink, {
        waitUntil: 'networkidle0',
      });

      await page.waitForSelector('amp-story-player');
      await expect(page).toMatchElement('amp-story-player');

      await expect(page).toBeValidAMP();
    });
  });
});
<|endoftext|>


<commit_before>// @flow strict

export default {
  'mmb.booking_state.confirmed': 'Confirmed',
  'mmb.booking_state.confirmed.travelled': 'Travelled',
  'mmb.booking_state.refunded': 'Refunded',
  'mmb.booking_state.in_process': 'In process',

  'mmb.my_bookings.title.bookings': 'My Bookings',
  'mmb.my_bookings.future_trips': 'Future trips',
  'mmb.my_bookings.past_trips': 'Past trips',

  'mmb.trip_info.return.departure': 'DEPARTURE',
  'mmb.trip_info.return.return': 'RETURN',
  'mmb.trip_info.duration.hours': 'h',
  'mmb.trip_info.duration.minutes': 'm',

  'mmb.status.cancelled': 'Cancelled',
  'mmb.status.closed': 'Closed',
  'mmb.status.confirmed': 'Confirmed',
  'mmb.status.deleted': 'Deleted',
  'mmb.status.expired': 'Expired',
  'mmb.status.new': 'New',
  'mmb.status.pending': 'Pending',
  'mmb.status.refused': 'Refused',
  'mmb.status.travelled': 'Travelled',
  'mmb.status.unknown': 'Unknown',

  // MMB Boarding passes
  'mmb.boarding_passes.boarding_pass': 'Boarding Pass',
  'mmb.boarding_passes.boarding_pass_return.departure': 'Departure',
  'mmb.boarding_passes.boarding_pass_return.return': 'Return',
  'mmb.boarding_passes.download_button.open_printable_document':
    'Open Printable Document',

  // MMB Flight overview
  'mmb.flight_overview.title': 'Flight Overview',
  'mmb.flight_overview.timeline.carrier': 'Carrier:',
  'mmb.flight_overview.timeline.flight_no': 'Flight number:',

  // MMB Flight services
  'mmb.flight_services.additional_baggage': 'Checked baggage',
  'mmb.flight_services.allocated_seating': 'Seat Selection',
  'mmb.flight_services.musical_equipment': 'Musical Equipment',
  'mmb.flight_services.traveling_with_pets': 'Pet Passengers',
  'mmb.flight_services.special_assistance': 'Special Assistance',
  'mmb.flight_services.sports_equipment': 'Sports Equipment',
  'mmb.flight_services.title': 'Services',
  'mmb.flight_services.title_ordered': 'Ordered',

  // MMB Tickets
  'mmb.tickets.available_when_booking_confirmed':
    'Your document will be ready as soon as your booking is confirmed.',
  'mmb.tickets.print_eticket_and_bring_to_airport':
    'Print your e-ticket and bring it to the airport',
  'mmb.tickets.not_available_yet': 'Not available yet',
  'mmb.tickets.open': 'Open Document',
  'mmb.tickets.e_ticket': 'E-Ticket',
  'mmb.tickets.not_available':
    'E-Ticket file is not available yet. Please try it later.',

  // MMB Boarding Passes
  'mmb.boarding_passes.not_available':
    'Boarding pass file is not available yet. Please try it later.',

  // MMB Trip info
  'mmb.title.trip_info': 'Trip info',
  'mmb.button.tickets': 'Tickets',
  'mmb.tickets.boarding_passes': 'Boarding Passes',
  'mmb.menu.my_tickets': 'My Tickets',
  'mmb.landing_page.maw.action_button.explore': 'Explore',
  'mmb.subtitle.airport_and_destination': 'Airport and destination',
  'mmb.timeline.title': 'Timeline',
  'mmb.subtitle.trip_schedule': 'Trip schedule',
  'mmb.menu.explore': 'Explore',
  'mmb.menu.timeline': 'Timeline',

  // MMB Trip services
  'mmb.trip_services.title': 'Trip services',
  'mmb.trip_services.general_services': 'General services',
  'mmb.trip_services.general_services.insurance': 'Insurance',
  'mmb.trip_services.local_services': 'Local services',
  'mmb.trip_services.local_services.car_rental': 'Car rental',
  'mmb.trip_services.local_services.hotel': 'Hotel',
  'mmb.trip_services.local_services.lounge': 'Lounge',
  'mmb.trip_services.local_services.parking': 'Parking',
  'mmb.trip_services.local_services.transportation': 'Transportation',
  'mmb.trip_services.locations_popup.title': 'For which part of the trip?',
  'mmb.trip_services.order.pax': 'Passengers',
  'mmb.trip_services.order.total': 'Total price including all taxes and fees',
  'mmb.trip_services.order.process_to_payment': 'Proceed to payment',
  'mmb.trip_services.order.process_to_refund': 'Proceed With The Refund',

  // MMB Insurance
  'mmb.trip_services.insurance.variant.none': 'No Insurance',
  'mmb.trip_services.insurance.variant.basic': 'Travel Basic',
  'mmb.trip_services.insurance.variant.plus': 'Travel Plus',

  // MMB Support
  'mmb.support.phone.suggested': 'Suggested',
  'mmb.support.phone.all_numbers': 'All Numbers',

  // MMB Invoices
  'mmb.invoices.not_available':
    'Invoice file is not available yet. Please try it later.',

  // MMB Passengers
  'mmb.passenger.birthday': 'Date of birth',
  'mmb.passenger.id': 'ID',
  'mmb.passenger.insurance': 'Insurance',
  'mmb.passenger.nationality.label': 'Nationality',
  'mmb.passengers.email': 'Email',
  'mmb.passengers.phone': 'Phone',
  'mmb.passengers.title.contact_details': 'Contact details',

  // MMB Visa

  'mmb.passengers.visa_disclaimer':
    'Kiwi.com is not responsible for any visa issue including airport transit visas. Contact the embassy or your foreign ministry to ensure that you will be able to complete your journey. Detailed visa information is also available from the IATA Travel Centre.',
  'mmb.visa_state.no_visa_required': 'Visa is not required',
  'mmb.visa_state.visa_is_required': 'Visa is required',
  'mmb.visa_state.visa_is_required_in': 'Visa required in:',
  'mmb.visa_state.visa_may_be_required_in': 'Visa may be required in:',
  'mmb.visa_state.visa_may_be_required': 'Visa may be required',
  // MMB menu:
  'mmb.main_menu.title': 'Manage my bookings',
  'mmb.flight_services': 'Flight Services',
  'mmb.title.passengers': 'Passengers',

  'mmb.main_menu.details': 'Details',
  'mmb.main_menu.passengers': 'Passengers',
  'mmb.main_menu.services': 'Services',
  'mmb.main_menu.services.flight_services': 'Flight Services',
  'mmb.main_menu.services.flight_services.description':
    'Wi-Fi, food, sport equipment',
  'mmb.main_menu.services.trip_services': 'Trip Services',
  'mmb.main_menu.services.trip_services.description':
    'Insurance, hotels, transfers',

  'mmb.main_menu.manage': 'Manage',
  'mmb.main_menu.manage.help': 'Help',
  'mmb.main_menu.manage.help.description': 'Contact us',
  'mmb.sub_menu.help.title': 'Support',
  'mmb.sub_menu.help.help': 'Help',
  'mmb.sub_menu.help.call_support': 'Call Support',

  'mmb.main_menu.manage.other': 'Other',
  'mmb.main_menu.manage.other.description':
    'Booking cancellation, invoice, etc',
  'mmb.sub_menu.manage.other.title': 'Others',
  'mmb.sub_menu.manage.other.invoice': 'Invoice',
  'mmb.sub_menu.manage.other.open_on_web': 'Open on Web',
  'mmb.sub_menu.manage.other.refund_form': 'Refund Form',
  'mmb.sub_menu.manage.other.apply_for_refund': 'Apply for refund',

  'mmb.trip_services.title.ordered': 'Ordered',

  // MMB Booking Timeline
  'mmb.booking_timeline.today': 'Today',
  'mmb.booking_timeline.event.in_destination': 'in __place__',
  'mmb.booking_timeline.event.booked_flight.title':
    'Booked flight to __1_destination__',
  'mmb.booking_timeline.event.airport_arrival.title':
    'Arrive at __1_airport__ airport (__2_code__)',
  'mmb.booking_timeline.event.airport_arrival.note':
    'Give yourself extra time, just in case.',

  'mmb.booking_timeline.event.leave_for_airport.title': 'Leave for the airport',
  'mmb.booking_timeline.event.leave_for_airport.note':
    "Don't forget your passport/photo ID.",

  'mmb.booking_timeline.event.download_invoice.title': 'Download invoice',
  'mmb.booking_timeline.event.download_invoice.note_not_available':
    'The invoice is not yet available.',
  'mmb.booking_timeline.event.download_invoice.note_singular':
    '__1_route__, __2_passengers__× traveller.',
  'mmb.booking_timeline.event.download_invoice.note_plural':
    '__1_route__, __2_passengers__× travellers.',
  'mmb.booking_timeline.event.download_invoice.button.title': 'Download',

  'mmb.booking_timeline.event.gate_arrival.title': 'Boarding at the gate',
  'mmb.booking_timeline.event.gate_arrival.note': 'Beware of the distance.',
  'mmb.booking_timeline.event.arrival.title':
    'Welcome to __1_airport__ airport (__2_code__)',

  'mmb.booking_timeline.event.departure.title':
    'Plane to __destination__ takes off',
  'mmb.booking_timeline.event.departure.note': 'Enjoy your flight.',
  'mmb.booking_timeline.event.departure.note_hour':
    'Enjoy your flight. The flight will take __hours__ hour.',
  'mmb.booking_timeline.event.departure.note_hours':
    'Enjoy your flight. The flight will take __hours__ hours.',
  'mmb.booking_timeline.event.departure.note_minutes':
    'Enjoy your flight. The flight will take __minutes__ minutes.',
  'mmb.booking_timeline.event.departure.note_minute':
    'Enjoy your flight. The flight will take __minutes__ minute.',
  'mmb.booking_timeline.event.departure.note_hour_minute':
    'Enjoy your flight. The flight will take __hours__ hour and __minutes__ minute.',
  'mmb.booking_timeline.event.departure.note_hour_minutes':
    'Enjoy your flight. The flight will take __hours__ hour and __minutes__ minutes.',
  'mmb.booking_timeline.event.departure.note_hours_minute':
    'Enjoy your flight. The flight will take __hours__ hours and __minutes__ minute.',
  'mmb.booking_timeline.event.departure.note_hours_minutes':
    'Enjoy your flight. The flight will take __hours__ hours and __minutes__ minutes.',

  'mmb.booking_timeline.event.transport_from_airport.title':
    'Getting transport from airport',
  'mmb.booking_timeline.event.transport_from_airport.note':
    'Expect additional costs.',
  'mmb.booking_timeline.event.download_eticket.title': 'Download e-ticket',
  'mmb.booking_timeline.event.download_eticket.button.title': 'Download',
  'mmb.booking_timeline.event.download_eticket.button.title.not_available':
    'Not yet available',

  'mmb.booking_timeline.event.download_boarding_pass.title':
    'Download your boarding pass',
  'mmb.booking_timeline.event.download_boarding_pass.note_not_available':
    'Not available yet.',
  'mmb.booking_timeline.event.download_boarding_pass.button.title': 'Download',
  'mmb.booking_timeline.event.download_boarding_pass.button.title.not_available':
    'Not yet available',
};
<commit_msg>Fixing label<commit_after>// @flow strict

export default {
  'mmb.booking_state.confirmed': 'Confirmed',
  'mmb.booking_state.confirmed.travelled': 'Travelled',
  'mmb.booking_state.refunded': 'Refunded',
  'mmb.booking_state.in_process': 'In process',

  'mmb.my_bookings.title.bookings': 'My Bookings',
  'mmb.my_bookings.future_trips': 'Future trips',
  'mmb.my_bookings.past_trips': 'Past trips',

  'mmb.trip_info.return.departure': 'DEPARTURE',
  'mmb.trip_info.return.return': 'RETURN',
  'mmb.trip_info.duration.hours': 'h',
  'mmb.trip_info.duration.minutes': 'm',

  'mmb.status.cancelled': 'Cancelled',
  'mmb.status.closed': 'Closed',
  'mmb.status.confirmed': 'Confirmed',
  'mmb.status.deleted': 'Deleted',
  'mmb.status.expired': 'Expired',
  'mmb.status.new': 'New',
  'mmb.status.pending': 'Pending',
  'mmb.status.refused': 'Refused',
  'mmb.status.travelled': 'Travelled',
  'mmb.status.unknown': 'Unknown',

  // MMB Boarding passes
  'mmb.boarding_passes.boarding_pass': 'Boarding Pass',
  'mmb.boarding_passes.boarding_pass_return.departure': 'Departure',
  'mmb.boarding_passes.boarding_pass_return.return': 'Return',
  'mmb.boarding_passes.download_button.open_printable_document':
    'Open Printable Document',

  // MMB Flight overview
  'mmb.flight_overview.title': 'Flight Overview',
  'mmb.flight_overview.timeline.carrier': 'Carrier:',
  'mmb.flight_overview.timeline.flight_no': 'Flight number:',

  // MMB Flight services
  'mmb.flight_services.additional_baggage': 'Checked baggage',
  'mmb.flight_services.allocated_seating': 'Seat Selection',
  'mmb.flight_services.musical_equipment': 'Musical Equipment',
  'mmb.flight_services.traveling_with_pets': 'Pet Passengers',
  'mmb.flight_services.special_assistance': 'Special Assistance',
  'mmb.flight_services.sports_equipment': 'Sports Equipment',
  'mmb.flight_services.title': 'Services',
  'mmb.flight_services.title_ordered': 'Ordered',

  // MMB Tickets
  'mmb.tickets.available_when_booking_confirmed':
    'Your document will be ready as soon as your booking is confirmed.',
  'mmb.tickets.print_eticket_and_bring_to_airport':
    'Print your e-ticket and bring it to the airport',
  'mmb.tickets.not_available_yet': 'Not available yet',
  'mmb.tickets.open': 'Open Document',
  'mmb.tickets.e_ticket': 'E-Ticket',
  'mmb.tickets.not_available':
    'E-Ticket file is not available yet. Please try it later.',

  // MMB Boarding Passes
  'mmb.boarding_passes.not_available':
    'Boarding pass file is not available yet. Please try it later.',

  // MMB Trip info
  'mmb.title.trip_info': 'Trip info',
  'mmb.button.tickets': 'Tickets',
  'mmb.tickets.boarding_passes': 'Boarding Passes',
  'mmb.menu.my_tickets': 'My Tickets',
  'mmb.landing_page.maw.action_button.explore': 'Explore',
  'mmb.subtitle.airport_and_destination': 'Airport and destination',
  'mmb.timeline.title': 'Timeline',
  'mmb.subtitle.trip_schedule': 'Trip schedule',
  'mmb.menu.explore': 'Explore',
  'mmb.menu.timeline': 'Timeline',

  // MMB Trip services
  'mmb.trip_services.title': 'Trip services',
  'mmb.trip_services.general_services': 'General services',
  'mmb.trip_services.general_services.insurance': 'Insurance',
  'mmb.trip_services.local_services': 'Local services',
  'mmb.trip_services.local_services.car_rental': 'Car rental',
  'mmb.trip_services.local_services.hotel': 'Hotel',
  'mmb.trip_services.local_services.lounge': 'Lounge',
  'mmb.trip_services.local_services.parking': 'Parking',
  'mmb.trip_services.local_services.transportation': 'Transportation',
  'mmb.trip_services.locations_popup.title': 'For which part of the trip?',
  'mmb.trip_services.order.pax': 'Passengers',
  'mmb.trip_services.order.total': 'Total price including all taxes and fees',
  'mmb.trip_services.order.process_to_payment': 'Proceed to payment',
  'mmb.trip_services.order.process_to_refund': 'Proceed With The Refund',

  // MMB Insurance
  'mmb.trip_services.insurance.variant.none': 'No Insurance',
  'mmb.trip_services.insurance.variant.basic': 'Travel Basic',
  'mmb.trip_services.insurance.variant.plus': 'Travel Plus',

  // MMB Support
  'mmb.support.phone.suggested': 'Suggested',
  'mmb.support.phone.all_numbers': 'All Numbers',

  // MMB Invoices
  'mmb.invoices.not_available':
    'Invoice file is not available yet. Please try it later.',

  // MMB Passengers
  'mmb.passenger.birthday': 'Date of birth',
  'mmb.passenger.id': 'ID',
  'mmb.passenger.insurance': 'Insurance',
  'mmb.passenger.nationality.label': 'Nationality',
  'mmb.passengers.email': 'Email',
  'mmb.passengers.phone': 'Phone',
  'mmb.passengers.title.contact_details': 'Contact details',

  // MMB Visa

  'mmb.passengers.visa_disclaimer':
    'Kiwi.com is not responsible for any visa issue including airport transit visas. Contact the embassy or your foreign ministry to ensure that you will be able to complete your journey. Detailed visa information is also available from the IATA Travel Centre.',
  'mmb.visa_state.no_visa_required': 'Visa is not required',
  'mmb.visa_state.visa_is_required': 'Visa is required',
  'mmb.visa_state.visa_is_required_in': 'Visa required in:',
  'mmb.visa_state.visa_may_be_required_in': 'Visa may be required in:',
  'mmb.visa_state.visa_may_be_required': 'Visa may be required',
  // MMB menu:
  'mmb.main_menu.title': 'Manage my bookings',
  'mmb.flight_services': 'Flight Services',
  'mmb.title.passengers': 'Passengers',

  'mmb.main_menu.details': 'Details',
  'mmb.main_menu.passengers': 'Passengers',
  'mmb.main_menu.services': 'Services',
  'mmb.main_menu.services.flight_services': 'Flight Services',
  'mmb.main_menu.services.flight_services.description':
    'Wi-Fi, food, sport equipment',
  'mmb.main_menu.services.trip_services': 'Trip Services',
  'mmb.main_menu.services.trip_services.description':
    'Insurance, hotels, transfers',

  'mmb.main_menu.manage': 'Manage',
  'mmb.main_menu.manage.help': 'Help',
  'mmb.main_menu.manage.help.description': 'Contact us',
  'mmb.sub_menu.help.title': 'Support',
  'mmb.sub_menu.help.help': 'Help',
  'mmb.sub_menu.help.call_support': 'Call Support',

  'mmb.main_menu.manage.other': 'Other',
  'mmb.main_menu.manage.other.description':
    'Booking cancellation, invoice, etc',
  'mmb.sub_menu.manage.other.title': 'Others',
  'mmb.sub_menu.manage.other.invoice': 'Invoice',
  'mmb.sub_menu.manage.other.open_on_web': 'Open on Web',
  'mmb.sub_menu.manage.other.refund_form': 'Refund Form',
  'mmb.sub_menu.manage.other.apply_for_refund': 'Apply for refund',

  'mmb.trip_services.title.ordered': 'Ordered',

  // MMB Booking Timeline
  'mmb.booking_timeline.today': 'Today',
  'mmb.booking_timeline.event.in_destination': 'in __place__',
  'mmb.booking_timeline.event.booked_flight.title':
    'Booked flight to __1_destination__',
  'mmb.booking_timeline.event.airport_arrival.title':
    'Arrive at __1_airport__ airport (__2_code__)',
  'mmb.booking_timeline.event.airport_arrival.note':
    'Give yourself extra time, just in case.',

  'mmb.booking_timeline.event.leave_for_airport.title': 'Leave for the airport',
  'mmb.booking_timeline.event.leave_for_airport.note':
    "Don't forget your passport/photo ID.",

  'mmb.booking_timeline.event.download_invoice.title': 'Download invoice',
  'mmb.booking_timeline.event.download_invoice.note_not_available':
    'The invoice is not yet available.',
  'mmb.booking_timeline.event.download_invoice.note_singular':
    '__1_route__, __2_passengers__× traveller.',
  'mmb.booking_timeline.event.download_invoice.note_plural':
    '__1_route__, __2_passengers__× travellers.',
  'mmb.booking_timeline.event.download_invoice.button.title': 'Download',

  'mmb.booking_timeline.event.gate_arrival.title': 'Boarding at the gate',
  'mmb.booking_timeline.event.gate_arrival.note': 'Beware of the distance.',
  'mmb.booking_timeline.event.arrival.title':
    'Welcome to __1_airport__ airport (__2_code__)',

  'mmb.booking_timeline.event.departure.title':
    'Plane to __destination__ takes off',
  'mmb.booking_timeline.event.departure.note': 'Enjoy your flight.',
  'mmb.booking_timeline.event.departure.note_hour':
    'Enjoy your flight. The flight will take __hours__ hour.',
  'mmb.booking_timeline.event.departure.note_hours':
    'Enjoy your flight. The flight will take __hours__ hours.',
  'mmb.booking_timeline.event.departure.note_minutes':
    'Enjoy your flight. The flight will take __minutes__ minutes.',
  'mmb.booking_timeline.event.departure.note_minute':
    'Enjoy your flight. The flight will take __minutes__ minute.',
  'mmb.booking_timeline.event.departure.note_hour_minute':
    'Enjoy your flight. The flight will take __hours__ hour and __minutes__ minute.',
  'mmb.booking_timeline.event.departure.note_hour_minutes':
    'Enjoy your flight. The flight will take __hours__ hour and __minutes__ minutes.',
  'mmb.booking_timeline.event.departure.note_hours_minute':
    'Enjoy your flight. The flight will take __hours__ hours and __minutes__ minute.',
  'mmb.booking_timeline.event.departure.note_hours_minutes':
    'Enjoy your flight. The flight will take __hours__ hours and __minutes__ minutes.',

  'mmb.booking_timeline.event.transport_from_airport.title':
    'Getting transport from airport',
  'mmb.booking_timeline.event.transport_from_airport.note':
    'Expect additional costs.',
  'mmb.booking_timeline.event.download_eticket.title': 'Download e-ticket',
  'mmb.booking_timeline.event.download_eticket.button.title': 'Download',
  'mmb.booking_timeline.event.download_eticket.button.title.not_available':
    'Not available yet',

  'mmb.booking_timeline.event.download_boarding_pass.title':
    'Download your boarding pass',
  'mmb.booking_timeline.event.download_boarding_pass.note_not_available':
    'Not available yet.',
  'mmb.booking_timeline.event.download_boarding_pass.button.title': 'Download',
  'mmb.booking_timeline.event.download_boarding_pass.button.title.not_available':
    'Not available yet',
};
<|endoftext|>


<commit_before>/**!
 *
 * Copyright (c) 2015-2016 Cisco Systems, Inc. See LICENSE file.
 */
import {assert} from '@ciscospark/test-helper-chai';
import Avatar from '../../';
import MockSpark from '@ciscospark/test-helper-mock-spark';

/* eslint camelcase: 0*/
describe(`Services`, () => {
  describe(`Avatar`, () => {
    const item1_40 = {uuid: `id1@example.com`, size: 40, url: `http://www-40.example.com`, cacheControl: 300};
    const item1_50 = {uuid: `id1@example.com`, size: 50, url: `http://www-50.example.com`, cacheControl: 300};
    const item1_80 = {uuid: `id1@example.com`, size: 80, url: `http://www-80.example.com`, cacheControl: 300};
    const item1_110 = {uuid: `id1@example.com`, size: 110, url: `http://www-110.example.com`, cacheControl: 300};
    const item1_192 = {uuid: `id1@example.com`, size: 192, url: `http://www-192.example.com`, cacheControl: 300};
    const item1_640 = {uuid: `id1@example.com`, size: 640, url: `http://www-640.example.com`, cacheControl: 300};
    const item1_1600 = {uuid: `id1@example.com`, size: 1600, url: `http://www-1600.example.com`, cacheControl: 300};
    const item2_80 = {uuid: `id2@example.com`, size: 80, url: `http://www2.example.com`, cacheControl: 300};
    const item3_80 = {uuid: `id3@example.com`, size: 80, url: `http://www3.example.com`, cacheControl: 300};

    describe(`AvatarUrlStore`, () => {
      let store;
      let spark;

      beforeEach(() => {
        spark = new MockSpark({
          children: {
            avatar: Avatar
          }
        });
        store = spark.avatar.store;
      });

      it(`add item failures`, () => {
        return Promise.all[
          assert.isRejected(store.add(), `\`item\` is required`),
          assert.isRejected(store.add({}), `\`uuid\` is required`),
          assert.isRejected(store.add({uuid: `id1`}), `\`size\` is required`),
          assert.isRejected(store.add({uuid: `id1`, size: 80}), `\`uuid\` does not appear to be a uuid`),
          assert.isRejected(store.add({uuid: `id1@example.com`, size: 80}), `\`url\` is required`),
          assert.isRejected(store.add({uuid: `id1@example.com`, size: 80, url: `http://www.example.com`}), `\`cacheControl\` is required`)
        ];
      });
      it(`get item failures`, () => {
        return Promise.all[
          assert.isRejected(store.get(), `\`item\` is required`),
          assert.isRejected(store.get({}), `\`item.uuid\` is required`),
          assert.isRejected(store.get({uuid: `id1`}), `\`item.size\` is required`),
          assert.isRejected(store.get({uuid: `id1`, size: 80}), `\`item.uuid\` does not appear to be a uuid`),
          assert.isRejected(store.get({uuid: `id1@example.com`, size: 80}), `No URL found by specified id`)
        ];
      });
      it(`set / get / remove`, () => {
        return Promise.all[
          assert.isFulfilled(store.add(item1_80)),
          assert.isFulfilled(store.add(item2_80)),
          assert.isFulfilled(store.add(item3_80)),
          assert.eventually.deepEqual(store.get(item1_80), item1_80),
          assert.eventually.deepEqual(store.get(item2_80), item2_80),
          assert.eventually.deepEqual(store.get(item3_80), item3_80),
          store.remove(item2_80),
          store.remove(item3_80),
          assert.isRejected(store.get(item3_80)),
          assert.isRejected(store.get(item2_80)),
          assert.isFulfilled(store.add(item1_40)),
          assert.isFulfilled(store.add(item1_50)),
          assert.isFulfilled(store.add(item1_110)),
          assert.isFulfilled(store.add(item1_192)),
          assert.isFulfilled(store.add(item1_640)),
          assert.isFulfilled(store.add(item1_1600)),
          store.remove({uuid: `id1@example.com`}),
          assert.isRejected(store.get(item1_40)),
          assert.isRejected(store.get(item1_50)),
          assert.isRejected(store.get(item1_80)),
          assert.isRejected(store.get(item1_110)),
          assert.isRejected(store.get(item1_192)),
          assert.isRejected(store.get(item1_640)),
          assert.isRejected(store.get(item1_1600))
        ];
      });
    });
  });
});
<commit_msg>Refactor ciscospark Migrate Avatar to packages<commit_after>/**!
 *
 * Copyright (c) 2015-2016 Cisco Systems, Inc. See LICENSE file.
 */
import {assert} from '@ciscospark/test-helper-chai';
import Avatar from '../../';
import MockSpark from '@ciscospark/test-helper-mock-spark';

/* eslint camelcase: 0*/
describe(`Services`, () => {
  describe(`Avatar`, () => {
    const item1_40 = {uuid: `88888888-4444-4444-4444-aaaaaaaaaaa0`, size: 40, url: `http://www-40.example.com`, cacheControl: 300};
    const item1_50 = {uuid: `88888888-4444-4444-4444-aaaaaaaaaaa0`, size: 50, url: `http://www-50.example.com`, cacheControl: 300};
    const item1_80 = {uuid: `88888888-4444-4444-4444-aaaaaaaaaaa0`, size: 80, url: `http://www-80.example.com`, cacheControl: 300};
    const item1_110 = {uuid: `88888888-4444-4444-4444-aaaaaaaaaaa0`, size: 110, url: `http://www-110.example.com`, cacheControl: 300};
    const item1_192 = {uuid: `88888888-4444-4444-4444-aaaaaaaaaaa0`, size: 192, url: `http://www-192.example.com`, cacheControl: 300};
    const item1_640 = {uuid: `88888888-4444-4444-4444-aaaaaaaaaaa0`, size: 640, url: `http://www-640.example.com`, cacheControl: 300};
    const item1_1600 = {uuid: `88888888-4444-4444-4444-aaaaaaaaaaa0`, size: 1600, url: `http://www-1600.example.com`, cacheControl: 300};
    const item2_80 = {uuid: `88888888-4444-4444-4444-aaaaaaaaaaa1`, size: 80, url: `http://www2.example.com`, cacheControl: 300};
    const item3_80 = {uuid: `88888888-4444-4444-4444-aaaaaaaaaaa2`, size: 80, url: `http://www3.example.com`, cacheControl: 300};

    describe(`AvatarUrlStore`, () => {
      let store;
      let spark;

      beforeEach(() => {
        spark = new MockSpark({
          children: {
            avatar: Avatar
          }
        });
        store = spark.avatar.store;
      });

      it(`add item failures`, () => {
        return Promise.all([
          assert.isRejected(store.add(), `\`item\` is required`),
          assert.isRejected(store.add({}), `\`uuid\` is required`),
          assert.isRejected(store.add({uuid: `id1`}), `\`size\` is required`),
          assert.isRejected(store.add({uuid: `id1`, size: 80}), `\`uuid\` does not appear to be a uuid`),
          assert.isRejected(store.add({uuid: `88888888-4444-4444-4444-aaaaaaaaaaa0`, size: 80}), `\`url\` is required`),
          assert.isRejected(store.add({uuid: `88888888-4444-4444-4444-aaaaaaaaaaa0`, size: 80, url: `http://www.example.com`}), `\`cacheControl\` is required`)
        ]);
      });
      it(`get item failures`, () => {
        return Promise.all([
          assert.isRejected(store.get(), `\`item\` is required`),
          assert.isRejected(store.get({}), `\`item.uuid\` is required`),
          assert.isRejected(store.get({uuid: `id1`}), `\`item.size\` is required`),
          assert.isRejected(store.get({uuid: `id1`, size: 80}), `\`item.uuid\` does not appear to be a uuid`),
          assert.isRejected(store.get({uuid: `88888888-4444-4444-4444-aaaaaaaaaaa0`, size: 80}), `No URL found by specified id`)
        ]);
      });
      it(`set / get / remove`, () => {
        return Promise.all([
          assert.isFulfilled(store.add(item1_80)),
          assert.isFulfilled(store.add(item2_80)),
          assert.isFulfilled(store.add(item3_80)),
          assert.eventually.deepEqual(store.get(item1_80), item1_80.url),
          assert.eventually.deepEqual(store.get(item2_80), item2_80.url),
          assert.eventually.deepEqual(store.get(item3_80), item3_80.url),
          store.remove(item2_80),
          store.remove(item3_80),
          assert.isRejected(store.get(item3_80)),
          assert.isRejected(store.get(item2_80)),
          assert.isFulfilled(store.add(item1_40)),
          assert.isFulfilled(store.add(item1_50)),
          assert.isFulfilled(store.add(item1_110)),
          assert.isFulfilled(store.add(item1_192)),
          assert.isFulfilled(store.add(item1_640)),
          assert.isFulfilled(store.add(item1_1600)),
          store.remove({uuid: `88888888-4444-4444-4444-aaaaaaaaaaa0`}),
          assert.isRejected(store.get(item1_40)),
          assert.isRejected(store.get(item1_50)),
          assert.isRejected(store.get(item1_80)),
          assert.isRejected(store.get(item1_110)),
          assert.isRejected(store.get(item1_192)),
          assert.isRejected(store.get(item1_640)),
          assert.isRejected(store.get(item1_1600))
        ]);
      });
    });
  });
});
<|endoftext|>


<commit_before>import React, { Component } from 'react';
import PropTypes from 'prop-types';
import uuid from 'uuid/v4';
import { isFunction } from 'lodash-es';
import { attempt } from 'lodash-es';
import { Provider } from '../AxisContext';
import addEventProps, { getNonEventHandlerProps } from '../../utils/events';
import getModifiedProps from '../../utils/getModifiedProps';
import { validAxisTypes } from '../../utils/propTypeValidators';
import { logZAxisErrorMessage } from '../../utils/warnings'

class Axis extends Component {

  static propTypes = {
    type: validAxisTypes,
    id: PropTypes.oneOfType([ PropTypes.string, PropTypes.func ]).isRequired,
    children: PropTypes.node,
    getChart: PropTypes.func, // Provided by ChartProvider
    dynamicAxis: PropTypes.bool.isRequired
  };

  static defaultProps = {
    id: uuid,
    children: null,
    dynamicAxis: true
  };

  constructor (props) {
    super(props);

    if (process.env.NODE_ENV === 'development') {
      const { id, getHighcharts } = props;
      if (id === 'zAxis' && !getHighcharts().ZAxis) logZAxisErrorMessage();
    }
  }

  componentDidUpdate (prevProps) {
    const modifiedProps = getModifiedProps(prevProps, this.props);
    if (modifiedProps !== false) {
      this.axis.update(modifiedProps);
    }
  }

  componentWillUnmount () {
    if (this.axis.remove) {
      // Axis may have already been removed, i.e. when Chart unmounted
      attempt(this.axis.remove.bind(this.axis));
    }
  }

  getAxisConfig = () => {
    const { id, children, ...rest } = this.props;

    const axisId = isFunction(id) ? id() : id
    const nonEventProps = getNonEventHandlerProps(rest);
    return {
      id: axisId,
      title: { text: null },
      ...nonEventProps
    }
  }

  createAxis () {
    const { id, dynamicAxis, isX, getChart } = this.props;
    const chart = getChart();

    // Create Highcharts Axis
    const opts = this.getAxisConfig();
    if (dynamicAxis) {
      this.axis = chart.addAxis(opts, isX, false);
    } else {
      // ZAxis cannot be added dynamically, Maps only have a single axes - update instead
      const axisId = isFunction(id) ? id() : id
      this.axis = chart.get(axisId);
      this.axis.update(opts, false);
    }

    const update = this.axis.update.bind(this.axis);

    // we rely addEventProps to call redraw
    addEventProps(update, this.props, true);
  }

  render () {
    if (!this.axis) this.createAxis();

    return (
      <Provider value={this.axis}>
        {this.props.children}
      </Provider>
    );
  }
}

export default Axis;
<commit_msg>Update packages/react-jsx-highcharts/src/components/Axis/Axis.js<commit_after>import React, { Component } from 'react';
import PropTypes from 'prop-types';
import uuid from 'uuid/v4';
import { isFunction } from 'lodash-es';
import { attempt } from 'lodash-es';
import { Provider } from '../AxisContext';
import addEventProps, { getNonEventHandlerProps } from '../../utils/events';
import getModifiedProps from '../../utils/getModifiedProps';
import { validAxisTypes } from '../../utils/propTypeValidators';
import { logZAxisErrorMessage } from '../../utils/warnings'

class Axis extends Component {

  static propTypes = {
    type: validAxisTypes,
    id: PropTypes.oneOfType([ PropTypes.string, PropTypes.func ]).isRequired,
    children: PropTypes.node,
    getChart: PropTypes.func, // Provided by ChartProvider
    dynamicAxis: PropTypes.bool.isRequired
  };

  static defaultProps = {
    id: uuid,
    children: null,
    dynamicAxis: true
  };

  constructor (props) {
    super(props);

    if (process.env.NODE_ENV === 'development') {
      const { id, getHighcharts } = props;
      if (id === 'zAxis' && !getHighcharts().ZAxis) logZAxisErrorMessage();
    }
  }

  componentDidUpdate (prevProps) {
    const modifiedProps = getModifiedProps(prevProps, this.props);
    if (modifiedProps !== false) {
      this.axis.update(modifiedProps);
    }
  }

  componentWillUnmount () {
    if (this.axis.remove) {
      // Axis may have already been removed, i.e. when Chart unmounted
      attempt(this.axis.remove.bind(this.axis));
    }
  }

  getAxisConfig = () => {
    const { id, children, ...rest } = this.props;

    const axisId = isFunction(id) ? id() : id
    const nonEventProps = getNonEventHandlerProps(rest);
    return {
      id: axisId,
      title: { text: null },
      ...nonEventProps
    }
  }

  createAxis = () => {
    const { id, dynamicAxis, isX, getChart } = this.props;
    const chart = getChart();

    // Create Highcharts Axis
    const opts = this.getAxisConfig();
    if (dynamicAxis) {
      this.axis = chart.addAxis(opts, isX, false);
    } else {
      // ZAxis cannot be added dynamically, Maps only have a single axes - update instead
      const axisId = isFunction(id) ? id() : id
      this.axis = chart.get(axisId);
      this.axis.update(opts, false);
    }

    const update = this.axis.update.bind(this.axis);

    // we rely addEventProps to call redraw
    addEventProps(update, this.props, true);
  }

  render () {
    if (!this.axis) this.createAxis();

    return (
      <Provider value={this.axis}>
        {this.props.children}
      </Provider>
    );
  }
}

export default Axis;
<|endoftext|>


<commit_before>'use strict';

angular.module('app')
    .controller('rgiDocumentTableCtrl', function (
        _,
        $scope,
        $rootScope,
        rgiDialogFactory,
        rgiAssessmentSrvc,
        rgiDocumentSrvc,
        rgiHttpResponseProcessorSrvc,
        rgiIdentitySrvc,
        rgiNotifier
    ) {
        var limit = 100,
            currentPage = 0,
            totalPages = 0;

        $scope.current_user = rgiIdentitySrvc.currentUser;
        $scope.busy = false;

        $scope.assessment_filter_options = [
            {value: 'all', text: 'Show all documents'}
            // {value: 'type', text: 'Sort by document type'},
            // {value: 'assessments', text: 'Sort by attached assessments'}
        ];

        $scope.assessment_filter = $scope.assessment_filter_options[0].value;

        rgiAssessmentSrvc.query({}, function (assessments) {
            if(assessments.reason) {
                rgiNotifier.error('No assessments');
            } else {
                assessments.forEach(function(assessment) {
                    console.log(assessment);
                    $scope.assessment_filter_options.push({
                        value: assessment.assessment_ID,
                        text: assessment.country + ' ' + assessment.year + ' ' + assessment.version
                    });
                });
            }
        });

        rgiDocumentSrvc.query({skip: currentPage, limit: limit}, function (response) {
            if(response.reason) {
                rgiNotifier.error('Load document data failure');
            } else {
                $scope.count = response.count;
                $scope.documents = response.data;
                totalPages = Math.ceil(response.count / limit);
                currentPage = currentPage + 1;
            }
        }, rgiHttpResponseProcessorSrvc.getDefaultHandler('Load document data failure'));

        $scope.loadMoreDocs = function() {
            if ($scope.busy) {
                return;
            }

            $scope.busy = true;

            if(currentPage < totalPages) {
                rgiDocumentSrvc.query({skip: currentPage, limit: limit}, function (response) {
                    if(response.reason) {
                        rgiNotifier.error('Documents loading failure');
                    } else {
                        $scope.documents = _.union($scope.documents, response.data);
                        currentPage = currentPage + 1;
                        $scope.busy = false;
                    }
                }, rgiHttpResponseProcessorSrvc.getDefaultHandler('Load document data failure'));
            }
        };

        $scope.deleteDocument = function(doc) {
            rgiDialogFactory.deleteDocument($scope, doc);
        };
    });
<commit_msg>fix the 'Document Table' directive controller<commit_after>'use strict';

angular.module('app')
    .controller('rgiDocumentTableCtrl', function (
        _,
        $scope,
        $rootScope,
        rgiDialogFactory,
        rgiAssessmentSrvc,
        rgiDocumentSrvc,
        rgiHttpResponseProcessorSrvc,
        rgiNotifier
    ) {
        var currentPage, totalPages, limit = 100;

        $scope.busy = false;
        $scope.assessment_filter_options = [];
        $scope.assessment_filter = '';

        rgiAssessmentSrvc.query({}, function (assessments) {
            if(assessments.reason) {
                rgiNotifier.error('No assessments');
            } else {
                assessments.forEach(function(assessment) {
                    $scope.assessment_filter_options.push({
                        value: assessment.assessment_ID,
                        text: assessment.country + ' ' + assessment.year + ' ' + assessment.version
                    });
                });
            }
        });

        $scope.$watch('assessment_filter', function(assessment) {
            currentPage = 0;
            totalPages = 0;
            var searchOptions = {skip: currentPage, limit: limit};

            if(assessment) {
                searchOptions.assessments = assessment;
            }

            rgiDocumentSrvc.queryCached(searchOptions, function (response) {
                if(response.reason) {
                    rgiNotifier.error('Load document data failure');
                } else {
                    $scope.count = response.count;
                    $scope.documents = response.data;

                    if($scope.documents.length === 0) {
                        rgiNotifier.error('No documents uploaded');
                    }

                    totalPages = Math.ceil(response.count / limit);
                    currentPage = 1;
                }
            }, rgiHttpResponseProcessorSrvc.getDefaultHandler('Load document data failure'));
        });

        $scope.loadMoreDocs = function() {
            if ($scope.busy) {
                return;
            }

            $scope.busy = true;

            if(currentPage < totalPages) {
                var searchOptions = {skip: currentPage, limit: limit};

                if($scope.assessment_filter) {
                    searchOptions.assessments = $scope.assessment_filter;
                }

                rgiDocumentSrvc.query(searchOptions, function (response) {
                    if(response.reason) {
                        rgiNotifier.error('Documents loading failure');
                    } else {
                        $scope.documents = _.union($scope.documents, response.data);
                        currentPage = currentPage + 1;
                        $scope.busy = false;
                    }
                }, rgiHttpResponseProcessorSrvc.getDefaultHandler('Load document data failure'));
            }
        };

        $scope.deleteDocument = function(doc) {
            rgiDialogFactory.deleteDocument($scope, doc);
        };
    });
<|endoftext|>


<commit_before>/*jslint browser: true */

define([
	'module',
	'backbone',
	'backgrid',
	'backgrid-paginator',
	'views/BackgridUrlCell',
	'views/BackgridClientSortingBody',
	'views/BaseView',
	'views/AlertView',
	'views/SearchFilterRowView',
	'hbs!hb_templates/managePublications'
], function (module, Backbone, Backgrid, Paginator, BackgridUrlCell, BackgridClientSortingBody, BaseView,
			 AlertView, SearchFilterRowView, hbTemplate) {
	"use strict";

	var view = BaseView.extend({

		events : {
			'change .page-size-select' : 'changePageSize',
			'click .search-btn' : 'filterPubs',
			'submit .pub-search-form' : 'filterPubs',
			'change #search-term-input' : 'updateQterm',
			'click .add-category-btn' : 'addFilterRow',
			'click .clear-advanced-search-btn' : 'clearFilterRows',
			'click .create-pub-btn' : 'goToEditPubPage'
		},

		template: hbTemplate,

		/*
		 * @param {Object} options
		 *     @prop {String} el - jquery selector where the view should be rendered
		 *     @prop {PublicationCollection} collection
		 */
		initialize : function(options) {
			var self = this;
			BaseView.prototype.initialize.apply(this, arguments);

			// Create filter model, listeners, and holder for filter rows.
			this.filterModel = new Backbone.Model();
			this.listenTo(this.model, 'change:q', this.changeQterm);
			this.filterRowViews = [];

			// Can get rid of this once the edit contributors page is implemented.
			this.context.oldMyPubsEndpoint = module.config().oldMyPubsEndpoint;

			// Set up collection event handlers and then fetch the collection
			this.listenTo(this.collection, 'request', this.showLoadingIndicator);
			this.listenTo(this.collection, 'sync', this.updatePubsListDisplay);

			this.fetchPromise = this.collection.fetch({reset: true});

			var fromRawLookup = function(rawValue, model) {
				return (rawValue) ? rawValue.text : '';
			};
			var sortValueLookup = function(model, colName) {
				return fromRawLookup(model.get(colName), model);
			};
			var sortValueText = function(model, colName) {
				return (model.has(colName)) ? model.get(colName) : '';
			};

			var fromRawFirstAuthor = function(rawValue, model) {
				if ((rawValue) && _.has(rawValue, 'authors') && (_.isArray(rawValue.authors)) && (rawValue.authors.length > 0)) {
					return rawValue.authors[0].text;
				}
				else {
					return '';
				}
			};
			var sortValueFirstAuthor = function(model, colName) {
				return fromRawFirstAuthor(model.get(colName));
			};

			// Create backgrid and paginator views
			var columns = [
				{
					name: 'id',
					label : '',
					editable : false,
					sortable : false,
					cell: BackgridUrlCell.extend({
						router : this.router,
						toFragment : function(rawValue, model) {
							return 'publication/' + rawValue;
						},
						title : 'Click to edit'
					}),
					formatter : {
						fromRaw : function(rawValue, model) {
							return 'Edit'
						}
					}
				}, {
					name: "publicationType",
					label: "Type",
					editable: false,
					sortable : true,
					cell: "string",
					formatter : {
						fromRaw : fromRawLookup
					},

					sortValue : sortValueLookup
				}, {
					name: "seriesTitle",
					label: "USGS Series",
					editable: false,
					sortable : true,
					cell: "string",
					formatter: {
						fromRaw: fromRawLookup
					},
					sortValue : sortValueLookup
				}, {
					name: "seriesNumber",
					label: "Report Number",
					editable: false,
					sortable : true,
					cell: "string",
					sortValue : sortValueText
				}, {
					name: "publicationYear",
					label: "Year",
					editable: false,
					sortable : true,
					cell: "string",
					sortValue : sortValueText
				},{
					name: 'indexId',
					label : 'Index ID',
					editable : false,
					sortable : true,
					cell: 'string',
					sortValue : sortValueText
				}, {
					name: "title",
					label: "Title",
					editable: false,
					sortable : true,
					cell: "string",
					sortValue : sortValueText
				},{
					name: 'contributors',
					label: 'First Author',
					editable : false,
					sortable : true,
					cell: 'string',
					formatter : {
						fromRaw : fromRawFirstAuthor
					},
					sortValue : sortValueFirstAuthor
				}
			];

			// Initialize a new Grid instance
			this.grid = new Backgrid.Grid({
				body : BackgridClientSortingBody,
				columns: columns,
				collection: this.collection,
				className : 'backgrid table-striped table-hover table-bordered'
			});

			// Initialize the paginator
			this.paginator = new Backgrid.Extension.Paginator({
				collection: this.collection,
				goBackFirstOnSort : false
			});

			// Create other child views
			this.alertView = new AlertView({
				el: '.alert-container'
			});
		},

		render : function() {
			var self = this;
			var $pubList;

			BaseView.prototype.render.apply(this, arguments);
			$pubList = this.$('.pub-grid');

			// Set the elements for child views and render if needed.
			this.alertView.setElement(this.$('.alert-container'));

			// Render the grid and attach the root to HTML document
			$pubList.append(this.grid.render().el);

			// Render the paginator
			this.$('.pub-grid-footer').append(this.paginator.render().el);

			this.fetchPromise.fail(function(jqXhr) {
				self.alertView.showDangerAlert('Can\'t retrieve the list of publications: ' + jqXhr.statusText);
			}).always(function() {
				// Make sure indicator is hidden. Need to do this in case the sync signal was sent before the view was rendered
				self.updatePubsListDisplay();
			});
		},

		remove : function() {
			this.grid.remove();
			this.paginator.remove();
			this.alertView.remove();
			_.each(this.filterRowViews, function(view) {
				view.remove();
			});

			BaseView.prototype.remove.apply(this, arguments);
			return this;
		},

		/*
		 * DOM event handlers
		 */
		filterPubs : function(ev) {
			var self = this;

			ev.preventDefault();
			this.collection.updateFilters(this.filterModel.attributes);
			this.collection.getFirstPage()
					.fail(function(jqXhr) {
						self.alertView.showDangerAlert('Can\'t retrieve the list of publications: ' + jqXhr.statusText);
					});
		},

		changePageSize : function(ev) {
			this.collection.setPageSize(parseInt(ev.currentTarget.value));
		},

		updateQterm : function(ev) {
			this.filterModel.set('q', ev.currentTarget.value);
		},

		addFilterRow : function(ev) {
			ev.preventDefault();
			var $rowContainer = this.$('.advanced-search-rows-container');
			var newRow = new SearchFilterRowView({
				el : '.filter-row-container',
				model : this.filterModel
			});
			$rowContainer.append('

');
			this.$('.advanced-search-rows-container').append('<div ');
			newRow.setElement($rowContainer.find('.filter-row-container:last-child')).render();
			this.filterRowViews.push(newRow);
		},

		clearFilterRows : function(ev) {
			var self = this;
			ev.preventDefault();
			_.each(this.filterRowViews, function(view) {
				view.remove();
			});
			this.filterRowViews = [];
		},

		goToEditPubPage : function (ev) {
			ev.preventDefault();
			this.router.navigate('publication', {trigger: true});
		},

		/*
		 * filterModel event handlers
		 */
		changeQTerm : function() {
			this.$('#search-term-input').val(this.filterModel.get('q'));
		},

		/* collection event handlers */
		showLoadingIndicator : function() {
			this.$('.pubs-loading-indicator').show();
		},

		updatePubsListDisplay : function() {
			this.$('.pubs-loading-indicator').hide();
			this.$('.pubs-count').html(this.collection.state.totalRecords);
		}
	});

	return view;
});<commit_msg>Added a Chapter column and an Origin column<commit_after>/*jslint browser: true */

define([
	'module',
	'backbone',
	'backgrid',
	'backgrid-paginator',
	'views/BackgridUrlCell',
	'views/BackgridClientSortingBody',
	'views/BaseView',
	'views/AlertView',
	'views/SearchFilterRowView',
	'hbs!hb_templates/managePublications'
], function (module, Backbone, Backgrid, Paginator, BackgridUrlCell, BackgridClientSortingBody, BaseView,
			 AlertView, SearchFilterRowView, hbTemplate) {
	"use strict";

	var view = BaseView.extend({

		events : {
			'change .page-size-select' : 'changePageSize',
			'click .search-btn' : 'filterPubs',
			'submit .pub-search-form' : 'filterPubs',
			'change #search-term-input' : 'updateQterm',
			'click .add-category-btn' : 'addFilterRow',
			'click .clear-advanced-search-btn' : 'clearFilterRows',
			'click .create-pub-btn' : 'goToEditPubPage'
		},

		template: hbTemplate,

		/*
		 * @param {Object} options
		 *     @prop {String} el - jquery selector where the view should be rendered
		 *     @prop {PublicationCollection} collection
		 */
		initialize : function(options) {
			var self = this;
			BaseView.prototype.initialize.apply(this, arguments);

			// Create filter model, listeners, and holder for filter rows.
			this.filterModel = new Backbone.Model();
			this.listenTo(this.model, 'change:q', this.changeQterm);
			this.filterRowViews = [];

			// Can get rid of this once the edit contributors page is implemented.
			this.context.oldMyPubsEndpoint = module.config().oldMyPubsEndpoint;

			// Set up collection event handlers and then fetch the collection
			this.listenTo(this.collection, 'request', this.showLoadingIndicator);
			this.listenTo(this.collection, 'sync', this.updatePubsListDisplay);

			this.fetchPromise = this.collection.fetch({reset: true});

			var fromRawLookup = function(rawValue, model) {
				return (rawValue) ? rawValue.text : '';
			};
			var sortValueLookup = function(model, colName) {
				return fromRawLookup(model.get(colName), model);
			};
			var sortValueText = function(model, colName) {
				return (model.has(colName)) ? model.get(colName) : '';
			};

			var fromRawFirstAuthor = function(rawValue, model) {
				if ((rawValue) && _.has(rawValue, 'authors') && (_.isArray(rawValue.authors)) && (rawValue.authors.length > 0)) {
					return rawValue.authors[0].text;
				}
				else {
					return '';
				}
			};
			var sortValueFirstAuthor = function(model, colName) {
				return fromRawFirstAuthor(model.get(colName));
			};

			// Create backgrid and paginator views
			var columns = [
				{
					name: 'id',
					label : '',
					editable : false,
					sortable : false,
					cell: BackgridUrlCell.extend({
						router : this.router,
						toFragment : function(rawValue, model) {
							return 'publication/' + rawValue;
						},
						title : 'Click to edit'
					}),
					formatter : {
						fromRaw : function(rawValue, model) {
							return 'Edit'
						}
					}
				}, {
					name: "publicationType",
					label: "Type",
					editable: false,
					sortable : true,
					cell: "string",
					formatter : {
						fromRaw : fromRawLookup
					},

					sortValue : sortValueLookup
				}, {
					name: "seriesTitle",
					label: "USGS Series",
					editable: false,
					sortable : true,
					cell: "string",
					formatter: {
						fromRaw: fromRawLookup
					},
					sortValue : sortValueLookup
				}, {
					name: "seriesNumber",
					label: "Report Number",
					editable: false,
					sortable : true,
					cell: "string",
					sortValue : sortValueText
				}, {
					name: "publicationYear",
					label: "Year",
					editable: false,
					sortable : true,
					cell: "string",
					sortValue : sortValueText
				},{
					name: 'indexId',
					label : 'Index ID',
					editable : false,
					sortable : true,
					cell: 'string',
					sortValue : sortValueText
				}, {
					name: "title",
					label: "Title",
					editable: false,
					sortable : true,
					cell: "string",
					sortValue : sortValueText
				},{
					name: 'chapter',
					label : 'Chapter',
					editable : false,
					sortable: true,
					cell: 'string',
					sortValue : sortValueText
				},
				{
					name: 'contributors',
					label: 'First Author',
					editable : false,
					sortable : true,
					cell: 'string',
					formatter : {
						fromRaw : fromRawFirstAuthor
					},
					sortValue : sortValueFirstAuthor
				},{
					name: 'sourceDatabase',
					label: 'Origin',
					editable : false,
					sortable: true,
					cell: 'string',
					sortValue : sortValueText
				}
			];

			// Initialize a new Grid instance
			this.grid = new Backgrid.Grid({
				body : BackgridClientSortingBody,
				columns: columns,
				collection: this.collection,
				className : 'backgrid table-striped table-hover table-bordered'
			});

			// Initialize the paginator
			this.paginator = new Backgrid.Extension.Paginator({
				collection: this.collection,
				goBackFirstOnSort : false
			});

			// Create other child views
			this.alertView = new AlertView({
				el: '.alert-container'
			});
		},

		render : function() {
			var self = this;
			var $pubList;

			BaseView.prototype.render.apply(this, arguments);
			$pubList = this.$('.pub-grid');

			// Set the elements for child views and render if needed.
			this.alertView.setElement(this.$('.alert-container'));

			// Render the grid and attach the root to HTML document
			$pubList.append(this.grid.render().el);

			// Render the paginator
			this.$('.pub-grid-footer').append(this.paginator.render().el);

			this.fetchPromise.fail(function(jqXhr) {
				self.alertView.showDangerAlert('Can\'t retrieve the list of publications: ' + jqXhr.statusText);
			}).always(function() {
				// Make sure indicator is hidden. Need to do this in case the sync signal was sent before the view was rendered
				self.updatePubsListDisplay();
			});
		},

		remove : function() {
			this.grid.remove();
			this.paginator.remove();
			this.alertView.remove();
			_.each(this.filterRowViews, function(view) {
				view.remove();
			});

			BaseView.prototype.remove.apply(this, arguments);
			return this;
		},

		/*
		 * DOM event handlers
		 */
		filterPubs : function(ev) {
			var self = this;

			ev.preventDefault();
			this.collection.updateFilters(this.filterModel.attributes);
			this.collection.getFirstPage()
					.fail(function(jqXhr) {
						self.alertView.showDangerAlert('Can\'t retrieve the list of publications: ' + jqXhr.statusText);
					});
		},

		changePageSize : function(ev) {
			this.collection.setPageSize(parseInt(ev.currentTarget.value));
		},

		updateQterm : function(ev) {
			this.filterModel.set('q', ev.currentTarget.value);
		},

		addFilterRow : function(ev) {
			ev.preventDefault();
			var $rowContainer = this.$('.advanced-search-rows-container');
			var newRow = new SearchFilterRowView({
				el : '.filter-row-container',
				model : this.filterModel
			});
			$rowContainer.append('

');
			this.$('.advanced-search-rows-container').append('<div ');
			newRow.setElement($rowContainer.find('.filter-row-container:last-child')).render();
			this.filterRowViews.push(newRow);
		},

		clearFilterRows : function(ev) {
			var self = this;
			ev.preventDefault();
			_.each(this.filterRowViews, function(view) {
				view.remove();
			});
			this.filterRowViews = [];
		},

		goToEditPubPage : function (ev) {
			ev.preventDefault();
			this.router.navigate('publication', {trigger: true});
		},

		/*
		 * filterModel event handlers
		 */
		changeQTerm : function() {
			this.$('#search-term-input').val(this.filterModel.get('q'));
		},

		/* collection event handlers */
		showLoadingIndicator : function() {
			this.$('.pubs-loading-indicator').show();
		},

		updatePubsListDisplay : function() {
			this.$('.pubs-loading-indicator').hide();
			this.$('.pubs-count').html(this.collection.state.totalRecords);
		}
	});

	return view;
});<|endoftext|>


<commit_before>const clickThroughBaseUrl = 'localhost:8080';  // placeholder

function wrapLink(str, trackingId) {
  str = str.replace(/\{(.+?)\/(.+?)\}/g, function(m, label, url) {
    return '' + label + '';
  });
  return str;
}

function insertUnsubscribeLink(body, unsubscribeId) {
  return body + "\nunsubscribe";
}

module.exports = {
  wrapLink,
  insertUnsubscribeLink
}
<commit_msg>Change variable names for consistency<commit_after>const clickThroughBaseUrl = 'localhost:8080';  // placeholder

function wrapLink(body, trackingId) {
  body = body.replace(/\{(.+?)\/(.+?)\}/g, function(m, label, url) {
    return '' + label + '';
  });
  return body;
}

function insertUnsubscribeLink(body, unsubscribeId) {
  return body + "\nunsubscribe";
}

module.exports = {
  wrapLink,
  insertUnsubscribeLink
}
<|endoftext|>


<commit_before>'use strict';
var app = angular.module('angularApp')

  .controller('AuthCtrl', function ($rootScope,$scope,$http) {
    $scope.auth_cookie="";
    $rootScope.tabs="";

	$rootScope.getTabs = function() {
     $http({method: 'GET', url: '/caNanoLab/rest/core/getTabs'}).
     success(function(data, status, headers, config) {
        $rootScope.tabs = data;
        }).
        error(function(data, status, headers, config) {
          // called asynchronously if an error occurs
          // or server returns response with an error status.
    	   });
    }

  $scope.getGroups = function() {
    return "Test";
     // $http({method: 'GET', url: '/caNanoLab/rest/core/getGroups'}).
     // success(function(data, status, headers, config) {
     //    $rootScope.tabs = data;
     //    }).
     //    error(function(data, status, headers, config) {
     //      // called asynchronously if an error occurs
     //      // or server returns response with an error status.
     //     });
    }

  });
<commit_msg>Minor fix. getGroups in auth redefined as rootScope function<commit_after>'use strict';
var app = angular.module('angularApp')

  .controller('AuthCtrl', function ($rootScope,$scope,$http) {
    $scope.auth_cookie="";
    $rootScope.tabs="";

	$rootScope.getTabs = function() {
     $http({method: 'GET', url: '/caNanoLab/rest/core/getTabs'}).
     success(function(data, status, headers, config) {
        $rootScope.tabs = data;
        }).
        error(function(data, status, headers, config) {
          // called asynchronously if an error occurs
          // or server returns response with an error status.
    	   });
    }

  $rootScope.getGroups = function() {
    return "Test";
     // $http({method: 'GET', url: '/caNanoLab/rest/core/getGroups'}).
     // success(function(data, status, headers, config) {
     //    $rootScope.tabs = data;
     //    }).
     //    error(function(data, status, headers, config) {
     //      // called asynchronously if an error occurs
     //      // or server returns response with an error status.
     //     });
    }

  });
<|endoftext|>


<commit_before>import React from 'react';
import Analyzer from 'Parser/Core/Analyzer';
import Combatants from 'Parser/Core/Modules/Combatants';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import { formatPercentage } from 'common/format';
import StatisticBox, { STATISTIC_ORDER } from 'Main/StatisticBox';

class Voracious extends Analyzer {
  static dependencies = {
    combatants: Combatants,
  };

  get uptime() {
    return this.combatants.selected.getBuffUptime(SPELLS.VORACIOUS.id) / this.owner.fightDuration;
  }

  get uptimeSuggestionThresholds() {
    return {
      actual: this.uptime,
      isLessThan: {
        minor: 0.95,
        average: 0.9,
        major: .8,
      },
      style: 'percentage',
    };
  }

  suggestions(when) {
    when(this.uptimeSuggestionThresholds)
        .addSuggestion((suggest, actual, recommended) => {
          return suggest('Your Voraciouse uptime can be improved.')
            .icon(SPELLS.VORACIOUS_TALENT.icon)
            .actual(`${formatPercentage(actual)}% Voracious uptime`)
            .recommended(`>${formatPercentage(recommended)}% is recommended`);
        });
  }

  statistic() {
    return (
      <StatisticBox
        icon={<SpellIcon id={SPELLS.VORACIOUS_TALENT.id} />}
        value={`${formatPercentage(this.uptime)} %`}
        label="Voracious uptime"
      />
    );
  }

  statisticOrder = STATISTIC_ORDER.CORE(1);
}

export default Voracious;
<commit_msg>Removed suggestion<commit_after>import React from 'react';
import Analyzer from 'Parser/Core/Analyzer';
import Combatants from 'Parser/Core/Modules/Combatants';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import { formatPercentage } from 'common/format';
import StatisticBox, { STATISTIC_ORDER } from 'Main/StatisticBox';

class Voracious extends Analyzer {
  static dependencies = {
    combatants: Combatants,
  };

  get uptime() {
    return this.combatants.selected.getBuffUptime(SPELLS.VORACIOUS.id) / this.owner.fightDuration;
  }

  get uptimeSuggestionThresholds() {
    return {
      actual: this.uptime,
      isLessThan: {
        minor: 0.95,
        average: 0.9,
        major: .8,
      },
      style: 'percentage',
    };
  }

  statistic() {
    return (
      <StatisticBox
        icon={<SpellIcon id={SPELLS.VORACIOUS_TALENT.id} />}
        value={`${formatPercentage(this.uptime)} %`}
        label="Voracious uptime"
      />
    );
  }

  statisticOrder = STATISTIC_ORDER.CORE(1);
}

export default Voracious;
<|endoftext|>


<commit_before>import SPELLS from 'common/SPELLS';
import Analyzer from 'Parser/Core/Analyzer';
import SpellUsable from 'Parser/Core/Modules/SpellUsable';

class LavaSurge extends Analyzer {
  static dependencies = {
    spellUsable: SpellUsable,
  };

  on_applybuff(event) {
    const spellId = event.ability.guid;
    if (spellId !== SPELLS.LAVA_SURGE.id) {
      return;
    }
    if (this.spellUsable.isOnCooldown(SPELLS.LAVA_BURST.id)) {
      this.spellUsable.reduceCooldown(SPELLS.LAVA_BURST.id, 8000);
    }
  }
}

export default LavaSurge;
<commit_msg>removed hardcoded numbers<commit_after>import SPELLS from 'common/SPELLS';
import Analyzer from 'Parser/Core/Analyzer';
import SpellUsable from 'Parser/Core/Modules/SpellUsable';
import Abilities from '../Abilities';

class LavaSurge extends Analyzer {
  static dependencies = {
    spellUsable: SpellUsable,
    abilities: Abilities,
  };

  on_applybuff(event) {
    const spellId = event.ability.guid;
    if (spellId !== SPELLS.LAVA_SURGE.id) {
      return;
    }
    if (this.spellUsable.isOnCooldown(SPELLS.LAVA_BURST.id)) {
      this.spellUsable.reduceCooldown(SPELLS.LAVA_BURST.id, this.abilities.getExpectedCooldownDuration(SPELLS.LAVA_BURST.id));
    }
  }
}

export default LavaSurge;
<|endoftext|>


<commit_before>'use strict';

app.component("eeaFormValidation", {
	template: '

',
	bindings: {
		scp: '='
	},
	controller: ['$translate', function($translate) {
		var parent = this;
		this.$onInit = function() {
			var ctimeout = ($('eea-form-testing').length) ? 4000 : 10;
			setTimeout(
				function() {
					parent.validate($translate);
					$('.formitem :input').change( function() {
						parent.validate($translate);
					});
					$('.rowbutton').click(function() {
						parent.validate($translate);
					});
					$('.deleterowbutton').click(function() {
						parent.validate($translate);
					});
				}, ctimeout);
		};
		this.validate = function($translate, noval) {
			$("#eeavalidation").html("");
			var content = 'Remaining fields:

';
			$("form.eeaform").each(function(){
				$(this).find('.formitem :input').each(function(index, fitem) {
					var itype = fitem.type;

					if (!itype || itype === "submit") return;

					var item = $(fitem);
					var val = item.val();

					if ((val && itype !== "checkbox") || (itype === "checkbox" && ! item.hasClass("ng-untouched") || item.is(':checked'))) {
						return;
					}

					fitem.onchange = function(){ parent.validate($translate); };

					var name = item.attr("name");
					var aname = name.split("$");
					var arr = aname[1];
					var nme = aname[0];

					content += "
Group " + arr + "
";
					content += "" + $translate.instant('labels.' + nme) + "
";
					content += ($translate.instant(item.attr("def"))  || "" )+ "
";

					content += "<button style=\"padding:2px;min-width:auto;font-size:11px;width:24px;max-width:24px;height:24px;\" onclick='" + name + ".focus()'>Go</button>

";

				});
				$("#eeavalidation").html(content + "
");
			});

			if (noval) return;
				setTimeout(function() {
					$('.deleterowbutton').click(function() {
						parent.validate($translate, true);
					});
				}, 500);
		};
	}]
});<commit_msg>Eslinted EEA Form Validation Component<commit_after>'use strict';

app.component("eeaFormValidation", {
	template: '

',
	bindings: {
		scp: '='
	},
	controller: ['$translate', function($translate) {
		var parent = this;
		this.$onInit = function() {
			var ctimeout = ($('eea-form-testing').length) ? 4000 : 10;
			setTimeout(
				function() {
					parent.validate($translate);
					$('.formitem :input').change( function() {
						parent.validate($translate);
					});
					$('.rowbutton').click(function() {
						parent.validate($translate);
					});
					$('.deleterowbutton').click(function() {
						parent.validate($translate);
					});
				}, ctimeout);
		};
		this.validate = function($translate, noval) {
			$("#eeavalidation").html("");
			var content = 'Remaining fields:

';
			$("form.eeaform").each(function(){
				$(this).find('.formitem :input').each(function(index, fitem) {
					var itype = fitem.type;

					if (!itype || itype === "submit") return;

					var item = $(fitem);
					var val = item.val();

					if ((val && itype !== "checkbox") || (itype === "checkbox" && ! item.hasClass("ng-untouched") || item.is(':checked'))) {
						return;
					}

					fitem.onchange = function(){ parent.validate($translate); };

					var name = item.attr("name");
					var aname = name.split("$");
					var arr = aname[1];
					var nme = aname[0];

					content += "
Group " + arr + "
";
					content += "" + $translate.instant('labels.' + nme) + "
";
					content += ($translate.instant(item.attr("def"))  || "" )+ "
";

					content += "<button style=\"padding:2px;min-width:auto;font-size:11px;width:24px;max-width:24px;height:24px;\" onclick='" + name + ".focus()'>Go</button>

";

				});
				$("#eeavalidation").html(content + "
");
			});

			if (noval) return;
			setTimeout(function() {
				$('.deleterowbutton').click(function() {
					parent.validate($translate, true);
				});
			}, 500);
		};
	}]
});<|endoftext|>


<commit_before>const getCurrentModuleId = (filePath) => {
    let done = false
    let failSafeCount = 0
    let pathSectionArray = filePath.split('/')

    const popFirstElementUntilDone = () => {
        failSafeCount++
        if (!done) {
            pathSectionArray.shift()
            done = (pathSectionArray[0] === 'src' || failSafeCount > 20)
            popFirstElementUntilDone()
        }
    }

    popFirstElementUntilDone()

    const formattedFilePath = pathSectionArray.join('->')

    return formattedFilePath
}

export default getCurrentModuleId<commit_msg>Minor syntax tweak<commit_after>const getCurrentModuleId = filePath => {
    let done = false
    let failSafeCount = 0
    let pathSectionArray = filePath.split('/')

    const popFirstElementUntilDone = () => {
        failSafeCount++
        if (!done) {
            pathSectionArray.shift()
            done = (pathSectionArray[0] === 'src' || failSafeCount > 20)
            popFirstElementUntilDone()
        }
    }

    popFirstElementUntilDone()

    const formattedFilePath = pathSectionArray.join('->')

    return formattedFilePath
}

export default getCurrentModuleId<|endoftext|>


<commit_before>export var svgHTMLIntegrationPoints = {foreignObject: 1, desc: 1, title: 1};
export var svgNamespace = 'http://www.w3.org/2000/svg';

// Safari does not like using innerHTML on SVG HTML integration
// points (desc/title/foreignObject).
var needsIntegrationPointFix = document.createElementNS && (function() {
  // In FF title will not accept innerHTML.
  var testEl = document.createElementNS(svgNamespace, 'title');
  testEl.innerHTML = "

";
  return testEl.childNodes.length === 0 || testEl.childNodes[0].nodeType !== 1;
})();

// Internet Explorer prior to 9 does not allow setting innerHTML if the first element
// is a "zero-scope" element. This problem can be worked around by making
// the first node an invisible text node. We, like Modernizr, use
var needsShy = (function() {
  var testEl = document.createElement('div');
  testEl.innerHTML = "

";
  testEl.firstChild.innerHTML = "


<commit_before>(function() {

    var module = angular.module('pullreq.service.pullrequests', ['lib.lodash']);

    module.factory('pullRequestService', [
        '_',
        function(_) {

            var testPaths = ['test/'];

            var getUsers = function(pullRequests) {
                var users = _.collect(pullRequests, function(pull) {
                    return pull.user.login;
                });
                return _.sortBy(_.unique(users), function(user) { return user; });
            };

            var populateStatus = function(pullRequest, warningPaths) {
                pullRequest.status_flags.review_approved = checkApproval(pullRequest);
                pullRequest.status_flags.has_tests = checkForTests(pullRequest);
                pullRequest.status_flags.has_warning = checkForWarning(pullRequest);
                pullRequest.status_flags.has_warning_paths = checkForWarningPaths(pullRequest, warningPaths);
            };

            var checkApproval = function(pullRequest) {
                var comments = pullRequest.info.issueComments;
                if (comments) {
                    comments = _.filter(comments, function(comment) {
                        return comment.body.indexOf('+1') !== -1;
                    });
                    comments =  _.unique(comments, function(comment) {
                        return comment.user.login;
                    });
                }
                return comments ? comments.length > 1 : false;
            };

            var checkForTests = function(pullRequest) {
                var files = pullRequest.info.files;
                return _.any(files, function(file) {
                    return _.any(testPaths, function(path) {
                        return file.filename.indexOf(path) !== -1;
                    });
                });
            };

            var checkForWarning = function(pullRequest) {
                return pullRequest.body.indexOf(':warning:') !== -1;
            };

            var checkForWarningPaths = function(pullRequest, warningPaths) {
                var files = pullRequest.info.files;
                var hasWarningPath = false;
                _.each(files, function(file) {
                    file.warn = _.any(warningPaths, function(path) {
                       return file.filename.indexOf(path.path) === 0;
                    });
                    hasWarningPath = hasWarningPath || file.warn;
                });
                return hasWarningPath;
            };

            var createRepos = function(pullRequests) {
                var repos = [];
                _.each(pullRequests, function(pullRequest) {

                    var repo =  _.find(repos, function(repo) {
                        return repo.owner === pullRequest.base.user.login &&
                               repo.name === pullRequest.base.repo.name;
                    });
                    if (!repo) {
                        repo = {
                            owner: pullRequest.base.user.login,
                            name: pullRequest.base.repo.name,
                            pullRequests:[]
                        };
                        repos.push(repo);
                    }
                    repo.pullRequests.push(pullRequest);
                });
                return _.sortBy(repos, function(repo) { return repo.name; });
            };

            return {
                getUsers: getUsers,
                createRepos: createRepos,
                populateStatus: populateStatus
            }
        }
    ]);
})();<commit_msg>Treat ':thumbsup:' the same as ':+1:'<commit_after>(function() {

    var module = angular.module('pullreq.service.pullrequests', ['lib.lodash']);

    module.factory('pullRequestService', [
        '_',
        function(_) {

            var testPaths = ['test/'];

            var getUsers = function(pullRequests) {
                var users = _.collect(pullRequests, function(pull) {
                    return pull.user.login;
                });
                return _.sortBy(_.unique(users), function(user) { return user; });
            };

            var populateStatus = function(pullRequest, warningPaths) {
                pullRequest.status_flags.review_approved = checkApproval(pullRequest);
                pullRequest.status_flags.has_tests = checkForTests(pullRequest);
                pullRequest.status_flags.has_warning = checkForWarning(pullRequest);
                pullRequest.status_flags.has_warning_paths = checkForWarningPaths(pullRequest, warningPaths);
            };

            var checkApproval = function(pullRequest) {
                var comments = pullRequest.info.issueComments;
                if (comments) {
                    comments = _.filter(comments, function(comment) {
                        return comment.body.indexOf('+1') !== -1 ||
                               comment.body.indexOf(':thumbsup:') !== -1;
                    });
                    comments =  _.unique(comments, function(comment) {
                        return comment.user.login;
                    });
                }
                return comments ? comments.length > 1 : false;
            };

            var checkForTests = function(pullRequest) {
                var files = pullRequest.info.files;
                return _.any(files, function(file) {
                    return _.any(testPaths, function(path) {
                        return file.filename.indexOf(path) !== -1;
                    });
                });
            };

            var checkForWarning = function(pullRequest) {
                return pullRequest.body.indexOf(':warning:') !== -1;
            };

            var checkForWarningPaths = function(pullRequest, warningPaths) {
                var files = pullRequest.info.files;
                var hasWarningPath = false;
                _.each(files, function(file) {
                    file.warn = _.any(warningPaths, function(path) {
                       return file.filename.indexOf(path.path) === 0;
                    });
                    hasWarningPath = hasWarningPath || file.warn;
                });
                return hasWarningPath;
            };

            var createRepos = function(pullRequests) {
                var repos = [];
                _.each(pullRequests, function(pullRequest) {

                    var repo =  _.find(repos, function(repo) {
                        return repo.owner === pullRequest.base.user.login &&
                               repo.name === pullRequest.base.repo.name;
                    });
                    if (!repo) {
                        repo = {
                            owner: pullRequest.base.user.login,
                            name: pullRequest.base.repo.name,
                            pullRequests:[]
                        };
                        repos.push(repo);
                    }
                    repo.pullRequests.push(pullRequest);
                });
                return _.sortBy(repos, function(repo) { return repo.name; });
            };

            return {
                getUsers: getUsers,
                createRepos: createRepos,
                populateStatus: populateStatus
            }
        }
    ]);
})();<|endoftext|>


<commit_before>const stringify = require('./stringify')
module.exports = function (errors) {
  const {
    runByHBuilderX
  } = require('@dcloudio/uni-cli-shared')
  if (runByHBuilderX) {
    console.log(stringify(errors))
  } else {
    console.warn(stringify(errors))
  }
}
<commit_msg>feat(app-plus): add warning<commit_after>const stringify = require('./stringify')
module.exports = function (errors) {
  const {
    runByHBuilderX
  } = require('@dcloudio/uni-cli-shared')
  if (runByHBuilderX) {
    console.log('WARNING: ' + stringify(errors))
  } else {
    console.warn(stringify(errors))
  }
}
<|endoftext|>


<commit_before>/*
 * Calculate the height of a single row.
 */
function heightOfRow(row) {
	// The height of a row is the maximum of all the minimum heights.
	return row.reduce(function(soFar, cell) {
		return Math.max(soFar, cell.minHeight());
	}, 0);
}

// I need to figure out how to remove these details from the global name space!
var emptyTestRow = [];
var singleTestRow = [{minHeight: function() { return 7; }}];
var manyTestRow = [{minHeight: function() { return 3; }},
	{minHeight: function() { return 1; }}, {minHeight: function() { return 4; }}];

(function testHeightsOfRows(){
	var rowHeightTests = [
		{ expr: 'heightOfRow(emptyTestRow)', result: 0 },
		{ expr: 'heightOfRow(singleTestRow)', result: 7 },
		{ expr: 'heightOfRow(manyTestRow)', result: 4 }
	];
	return testExpressions(rowHeightTests);
})();

/*
 * Calculate the heights of all rows.
 */
function rowHeights(rows) {
	return rows.map(heightOfRow);
};

// Ditto!
var emptyTestRows = [emptyTestRow];
var singleTestRows = [emptyTestRow, singleTestRow];
var manyTestRows = [emptyTestRow, singleTestRow, manyTestRow];
(function testHeightsOfRows(){
	var rowHeightTests = [
		{ expr: 'rowHeights(emptyTestRows)', result: [ 0 ] },
		{ expr: 'rowHeights(singleTestRows)', result: [ 0, 7 ] },
		{ expr: 'rowHeights(manyTestRows)', result: [ 0, 7, 4 ] }
	];
	testExpressions(rowHeightTests);
})();

/*
 * Calculate the widths of each column in the `rows`.
 */
function cellWidths(rows) {
	return rows[0].map(function(_, colNdx) {
		// The width of the column at `colNdx` is the maximum of the cell widths of all rows in that column.
		return rows.reduce(function(max, row) {
			return Math.max(max, row[colNdx].minWidth());
		}, 0);
	});
};

<commit_msg>Finished writing `draw_table` "module"<commit_after>/*
 * Calculate the height of a single row.
 */
function heightOfRow(row) {
	// The height of a row is the maximum of all the minimum heights.
	return row.reduce(function(soFar, cell) {
		return Math.max(soFar, cell.minHeight());
	}, 0);
}

// I need to figure out how to remove these details from the global name space!
var emptyTestRow = [];
var singleTestRow = [{minHeight: function() { return 7; }}];
var manyTestRow = [{minHeight: function() { return 3; }},
	{minHeight: function() { return 1; }}, {minHeight: function() { return 4; }}];

(function testHeightsOfRows(){
	var rowHeightTests = [
		{ expr: 'heightOfRow(emptyTestRow)', result: 0 },
		{ expr: 'heightOfRow(singleTestRow)', result: 7 },
		{ expr: 'heightOfRow(manyTestRow)', result: 4 }
	];
	return testExpressions(rowHeightTests);
})();

/*
 * Calculate the heights of all rows.
 */
function rowHeights(rows) {
	return rows.map(heightOfRow);
};

// Ditto!
var emptyTestRows = [emptyTestRow];
var singleTestRows = [emptyTestRow, singleTestRow];
var manyTestRows = [emptyTestRow, singleTestRow, manyTestRow];
(function testHeightsOfRows() {
	var rowHeightTests = [
		{ expr: 'rowHeights(emptyTestRows)', result: [ 0 ] },
		{ expr: 'rowHeights(singleTestRows)', result: [ 0, 7 ] },
		{ expr: 'rowHeights(manyTestRows)', result: [ 0, 7, 4 ] }
	];
	testExpressions(rowHeightTests);
})();

/*
 * Maximum width in column indexed by `cellNdx` within `rows`.
 */
function widthOfCellsInColumn(rows, colNdx) {
	return rows.reduce(function(cellWidthSoFar, row) {
		return Math.max(cellWidthSoFar, row[colNdx].minWidth());
	}, 0);
}

var singleColumnRow = [ { minWidth: function() { return 2; } } ];
var singleColumnRows = [ singleColumnRow ];
var manyColumnRow = [ { minWidth: function() { return 7; } },
	{ minWidth: function() { return 1; } },
	{ minWidth: function() { return 8; } } ];
var manyColumnRows = [ manyColumnRow ];
var manyColumnRow1 = [ { minWidth: function() { return 1; } },
	{ minWidth: function() { return 4; } },
	{ minWidth: function() { return 1; } } ];
var manyColumnRow2 = [ { minWidth: function() { return 3; } },
	{ minWidth: function() { return 1; } },
	{ minWidth: function() { return 4; } } ];
var manyColumnRow3 = [ { minWidth: function() { return 2; } },
	{ minWidth: function() { return 7; } },
	{ minWidth: function() { return 1; } } ];
var manyRowsManyColumns = [ manyColumnRow1, manyColumnRow2, manyColumnRow3 ];
(function testWidthsOfCells() {
	var cellWidthTests = [
		{ expr: 'widthOfCellsInColumn(singleColumnRows, 0)', result: 2 },
		{ expr: 'widthOfCellsInColumn(manyColumnRows, 0)', result: 7 },
		{ expr: 'widthOfCellsInColumn(manyColumnRows, 1)', result: 1 },
		{ expr: 'widthOfCellsInColumn(manyColumnRows, 2)', result: 8 },
		{ expr: 'widthOfCellsInColumn(manyRowsManyColumns, 0)', result: 3 },
		{ expr: 'widthOfCellsInColumn(manyRowsManyColumns, 1)', result: 7 },
		{ expr: 'widthOfCellsInColumn(manyRowsManyColumns, 2)', result: 4 }
  	];
	testExpressions(cellWidthTests);
})();

/*
 * Calculate the widths of each column in the `rows`.
 */
function columnWidths(rows) {
		return rows[0].map(function(_, colNdx) { return widthOfCellsInColumn(rows, colNdx);
	});
}

/**
 * Draw a table.
 */
function drawTable(rows) {
	var heights = rowHeights(rows);
	var widths = columnWidths(rows);

	var drawLine = function(blocks, lineNo) {
		return blocks.map(function(block) {
			return block[lineNo];
		}).join(' ');
	};

	var drawRow = function(row, rowNumber) {
		var blocks = row.map(function(cell, columnNumber) {
			return cell.draw(widths[columnNumber], heights[rowNumber]);
		});

		return blocks[0].map(function(_, lineNumber) {
			return drawLine(blocks, lineNumber);
		}).join('\n');
	};

	return rows.map(drawRow).join('\n');
}

/*
 * Repeat the string, `str`, `count` times.
 */
function repeat(str, count) {
	var result = '';
	for (var i = 0; i < count; i++) {
		result += str;
	};
	return result;
}

/*
 * A cell consisting only of text.
 */
function TextCell(text) {
	this.text = text.split('\n');
}

/*
 * The minimum width of a `TextCell`.
 */
TextCell.prototype.minWidth = function() {
	return this.text.reduce(function(width, line) {
		return Math.max(width, line.length);
	}, 0);
}

/*
 * The minimum height of a `TextCell`.
 */
TextCell.prototype.minHeight = function() {
	return this.text.length;
}

/*
 * Draws a `TextCell`.
 */
TextCell.prototype.draw = function(width, height) {
	var result = [];
	for (var i = 0; i < height; i++) {
		var line = this.text[i] || '';
		result.push(line + repeat(' ', width - line.length));
	};
	return result;
}

var rows = [];
for (var i = 0; i < 5; i++) {
	var row = [];
	for (var j = 0; j < 5; j++) {
		if ((j + i) % 2 == 0) {
			row.push(new TextCell('##'));
		}
		else {
			row.push(new TextCell('  '));
		}
	}
	rows.push(row);
}
console.log(drawTable(rows));
<|endoftext|>


<commit_before>"use strict";
var platform_browser_dynamic_1 = require('@angular/platform-browser-dynamic');
var app_module_1 = require('./app.module');
var platform = platform_browser_dynamic_1.platformBrowserDynamic();
platform.bootstrapModule(app_module_1.Stars);
//# sourceMappingURL=main.js.map<commit_msg>Delete main.js<commit_after><|endoftext|>


<commit_before>'use strict';

// Конфиги для всех test suites. Не перегружаются нигде.
module.exports = {

  testsDirEnvVarName: 'TIA_TESTS_DIR',

  requireModulesEnvVarName: 'TIA_REQUIRE_MODULES',

  emailCfgPathEnvVarName: 'TIA_EMAIL_CFG_PATH',

  externalLogEnvVarName: 'TIA_EXTERNAL_LOG',

  // Имя файла для локального конфига.
  configName: 'config.js',

  // Имя файла для конфига пакета тестов (test suite), перегружающего настройки по умолчанию.
  suiteConfigName: 'suite-config.js',

  // Корневая директория, где лежат профайлы. Не перегружается в локальных конфигах.
  profileRootDir: 'br-profiles',

  // Дефолтный дисплей для GUI тестов.
  // Сохраняем состояние в момент старта.
  defDisplay: process.env.DISPLAY,

  // TODO: Имя лога для git pull, этот лог посылается на почту.
  gitPullLog: 'gitpull.log',

  // File name for PID for remote chrome driver.
  remoteChromeDriverPid: 'cd.pid',

  // File name for PID for remote chrome driver.
  remoteChromeDriverSid: 'cd.sid',

  logEncoding: 'utf8',  // ascii

  selfTestsEtMLog: 'tests.et',

  selfTestsExtLog: 'ext-log.log',

  hangTimeout: 20000, // Timeout after which action function considered as hanging.,

  defaultWaitTimeout: 20000, // Default timeout for e.wait functions.,

  // Delay before click on ExtJs element. It seems like ExtJs does not handle
  // too fast clicking.
  extJsClickDelay: 0, // milliseconds.

  maxRecursiveErrCountForTest: 2, // Maximum recursive errors count for one test.

  // Maximum tests count with recursive errors if this limit is exceeded
  // all tests will be cancelled.
  maxTestCountWithRecursiveError: 2,

  // Comboboxes have a glitch, at one left click they can open bouldList and immediately close it.
  // This constant sets how many times tia will retry to click comboboxes if bound List is not opened.
  // If retry count is 0 the only one attempt to click combobox will be performed.
  cbRetryClicksCount: 2,

  cbBoundListTimeout: 5000, // milliseconds for waiting of bound list to be opened after click on combobox.

  // milliseconds for waiting of ajax requests after clicks.
  // This is actual for lazy loading some stuff at clicking.
  ajaxTimeoutAfterClick: 5000, // TODO: increase after good debugging. For now low value is needed to detect unstable parts.

  elGetTextFail: 'ElGetTextFail' // The error message for getText fail for Web Element.
};
<commit_msg>Increased timeout for ajax requests.<commit_after>'use strict';

// Конфиги для всех test suites. Не перегружаются нигде.
module.exports = {

  testsDirEnvVarName: 'TIA_TESTS_DIR',

  requireModulesEnvVarName: 'TIA_REQUIRE_MODULES',

  emailCfgPathEnvVarName: 'TIA_EMAIL_CFG_PATH',

  externalLogEnvVarName: 'TIA_EXTERNAL_LOG',

  // Имя файла для локального конфига.
  configName: 'config.js',

  // Имя файла для конфига пакета тестов (test suite), перегружающего настройки по умолчанию.
  suiteConfigName: 'suite-config.js',

  // Корневая директория, где лежат профайлы. Не перегружается в локальных конфигах.
  profileRootDir: 'br-profiles',

  // Дефолтный дисплей для GUI тестов.
  // Сохраняем состояние в момент старта.
  defDisplay: process.env.DISPLAY,

  // TODO: Имя лога для git pull, этот лог посылается на почту.
  gitPullLog: 'gitpull.log',

  // File name for PID for remote chrome driver.
  remoteChromeDriverPid: 'cd.pid',

  // File name for PID for remote chrome driver.
  remoteChromeDriverSid: 'cd.sid',

  logEncoding: 'utf8',  // ascii

  selfTestsEtMLog: 'tests.et',

  selfTestsExtLog: 'ext-log.log',

  hangTimeout: 20000, // Timeout after which action function considered as hanging.,

  defaultWaitTimeout: 20000, // Default timeout for e.wait functions.,

  // Delay before click on ExtJs element. It seems like ExtJs does not handle
  // too fast clicking.
  extJsClickDelay: 0, // milliseconds.

  maxRecursiveErrCountForTest: 2, // Maximum recursive errors count for one test.

  // Maximum tests count with recursive errors if this limit is exceeded
  // all tests will be cancelled.
  maxTestCountWithRecursiveError: 2,

  // Comboboxes have a glitch, at one left click they can open bouldList and immediately close it.
  // This constant sets how many times tia will retry to click comboboxes if bound List is not opened.
  // If retry count is 0 the only one attempt to click combobox will be performed.
  cbRetryClicksCount: 2,

  cbBoundListTimeout: 5000, // milliseconds for waiting of bound list to be opened after click on combobox.

  // milliseconds for waiting of ajax requests after clicks.
  // This is actual for lazy loading some stuff at clicking.
  ajaxTimeoutAfterClick: 15000, // TODO: increase after good debugging. For now low value is needed to detect unstable parts.

  elGetTextFail: 'ElGetTextFail' // The error message for getText fail for Web Element.
};
<|endoftext|>


<commit_before>"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1 = require('@angular/core');
var flickr_1 = require('./flickr');
var FlickrDetailComponent = (function () {
    function FlickrDetailComponent() {
    }
    __decorate([
        core_1.Input(),
        __metadata('design:type', flickr_1.Flickr)
    ], FlickrDetailComponent.prototype, "flickr", void 0);
    FlickrDetailComponent = __decorate([
        core_1.Component({
            selector: 'my-flickr-detail',
            template: "\n        <div *ngIf=\"flickr\" >\n            <img class=\"xl\" src=\"{{flickr.urlxl}}\" />\n        </div>\n    ",
        }),
        __metadata('design:paramtypes', [])
    ], FlickrDetailComponent);
    return FlickrDetailComponent;
}());
exports.FlickrDetailComponent = FlickrDetailComponent;
//# sourceMappingURL=flickr-detail.component.js.map<commit_msg>Delete flickr-detail.component.js<commit_after><|endoftext|>