"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var React = require("react");
var example_app_base_1 = require("@uifabric/example-app-base");
var Calendar_1 = require("office-ui-fabric-react/lib/Calendar");
var Calendar_Button_Example_1 = require("./examples/Calendar.Button.Example");
var Calendar_Inline_Example_1 = require("./examples/Calendar.Inline.Example");
var ComponentStatus_1 = require("../../demo/ComponentStatus/ComponentStatus");
var Calendar_checklist_1 = require("./Calendar.checklist");
var DateMath_1 = require("../../utilities/dateMath/DateMath");
var CalendarButtonExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Calendar/examples/Calendar.Button.Example.tsx');
var CalendarInlineExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/Calendar/examples/Calendar.Inline.Example.tsx');
var CalendarPage = /** @class */ (function (_super) {
    tslib_1.__extends(CalendarPage, _super);
    function CalendarPage() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    CalendarPage.prototype.render = function () {
        var today = new Date(Date.now());
        return (React.createElement(example_app_base_1.ComponentPage, { title: 'Calendar', componentName: 'CalendarExample', exampleCards: React.createElement("div", null,
                React.createElement(example_app_base_1.ExampleCard, { title: 'Inline Calendar', code: CalendarInlineExampleCode },
                    React.createElement(Calendar_Inline_Example_1.CalendarInlineExample, { isMonthPickerVisible: false, dateRangeType: Calendar_1.DateRangeType.Day, autoNavigateOnSelection: false, showGoToToday: false })),
                React.createElement(example_app_base_1.ExampleCard, { title: 'Inline Calendar with overlayed month picker when header is clicked', code: CalendarInlineExampleCode },
                    React.createElement(Calendar_Inline_Example_1.CalendarInlineExample, { showMonthPickerAsOverlay: true, highlightCurrentMonth: true, dateRangeType: Calendar_1.DateRangeType.Day, autoNavigateOnSelection: false, showGoToToday: false })),
                React.createElement(example_app_base_1.ExampleCard, { title: 'Inline Calendar with month picker', code: CalendarInlineExampleCode },
                    React.createElement(Calendar_Inline_Example_1.CalendarInlineExample, { dateRangeType: Calendar_1.DateRangeType.Day, autoNavigateOnSelection: false, highlightCurrentMonth: true, showGoToToday: true })),
                React.createElement(example_app_base_1.ExampleCard, { title: 'Inline Calendar with week selection', code: CalendarInlineExampleCode },
                    React.createElement(Calendar_Inline_Example_1.CalendarInlineExample, { dateRangeType: Calendar_1.DateRangeType.Week, autoNavigateOnSelection: true, showGoToToday: true, showNavigateButtons: true })),
                React.createElement(example_app_base_1.ExampleCard, { title: 'Inline Calendar with month selection', code: CalendarInlineExampleCode },
                    React.createElement(Calendar_Inline_Example_1.CalendarInlineExample, { dateRangeType: Calendar_1.DateRangeType.Month, autoNavigateOnSelection: true, showGoToToday: true, showNavigateButtons: true })),
                React.createElement(example_app_base_1.ExampleCard, { title: 'Inline Calendar with week numbers', code: CalendarInlineExampleCode },
                    React.createElement(Calendar_Inline_Example_1.CalendarInlineExample, { isMonthPickerVisible: false, dateRangeType: Calendar_1.DateRangeType.Day, autoNavigateOnSelection: false, showGoToToday: false, showWeekNumbers: true })),
                React.createElement(example_app_base_1.ExampleCard, { title: 'Inline Calendar with 6 weeks display by default', code: CalendarInlineExampleCode },
                    React.createElement(Calendar_Inline_Example_1.CalendarInlineExample, { isMonthPickerVisible: false, dateRangeType: Calendar_1.DateRangeType.Day, autoNavigateOnSelection: false, showGoToToday: false, showSixWeeksByDefault: true })),
                React.createElement(example_app_base_1.ExampleCard, { title: 'Inline Calendar with month picker and no day picker', code: CalendarInlineExampleCode },
                    React.createElement(Calendar_Inline_Example_1.CalendarInlineExample, { dateRangeType: Calendar_1.DateRangeType.Month, autoNavigateOnSelection: false, showGoToToday: true, highlightCurrentMonth: true, isDayPickerVisible: false })),
                React.createElement(example_app_base_1.ExampleCard, { title: 'Inline Calendar with date boundary (minDate, maxDate)', code: CalendarInlineExampleCode },
                    React.createElement(Calendar_Inline_Example_1.CalendarInlineExample, { dateRangeType: Calendar_1.DateRangeType.Day, autoNavigateOnSelection: true, highlightCurrentMonth: true, showGoToToday: false, minDate: DateMath_1.addMonths(today, -1), maxDate: DateMath_1.addYears(today, 1) })),
                React.createElement(example_app_base_1.ExampleCard, { title: 'Calendar launched from a button', code: CalendarButtonExampleCode },
                    React.createElement(Calendar_Button_Example_1.CalendarButtonExample, null)),
                React.createElement(example_app_base_1.ExampleCard, { title: 'Month picker launched from a button', code: CalendarButtonExampleCode },
                    React.createElement(Calendar_Button_Example_1.CalendarButtonExample, { isDayPickerVisible: false, highlightCurrentMonth: true, buttonString: 'Click for Month Picker' })),
                React.createElement(example_app_base_1.ExampleCard, { title: 'Calendar with overlayed month picker launched from a button', code: CalendarButtonExampleCode },
                    React.createElement(Calendar_Button_Example_1.CalendarButtonExample, { showMonthPickerAsOverlay: true, highlightCurrentMonth: true, buttonString: 'Click for Overlayed Day Picker and Month Picker' }))), propertiesTables: React.createElement(example_app_base_1.PropertiesTableSet, { sources: [
                    require('!raw-loader!office-ui-fabric-react/src/components/Calendar/Calendar.types.ts')
                ] }), overview: React.createElement("div", null,
                React.createElement("p", null, "The calendar component allows a user to browse through a calendar and pick a date value.")), bestPractices: React.createElement("div", null), dos: React.createElement("div", null,
                React.createElement("ul", null,
                    React.createElement("li", null, "Use the control as a single entity."),
                    React.createElement("li", null, "Set the default date to the current date unless a specific date is required for context (e.g. the date of the conference)."),
                    React.createElement("li", null, "The control is designed to resize relative to available screen width. Allow it to render in either wide or narrow as appropriate."),
                    React.createElement("li", null, "When the control is engaged, the Calendar renders as a flyout and has defined widths (300px -narrow and 440px \u2013 wide). Plan your UI implementation accordingly."),
                    React.createElement("li", null, "The control renders date in a specific format. If allowing for manual entry of date, provide helper text in the appropriate format."))), donts: React.createElement("div", null,
                React.createElement("ul", null,
                    React.createElement("li", null, "Don't attempt to break apart year from month/day selectors. If granularity is required, use the Dropdown control or something similar."),
                    React.createElement("li", null, "Don't attempt to force resize the control in any way."),
                    React.createElement("li", null, "Don't force the control to render one mode vs. the other (year or month/day)"),
                    React.createElement("li", null, "The flyout selector is a light dismiss control. Don't modify this behavior in any way."))), isHeaderVisible: this.props.isHeaderVisible, componentStatus: React.createElement(ComponentStatus_1.ComponentStatus, tslib_1.__assign({}, Calendar_checklist_1.CalendarStatus)) }));
    };
    return CalendarPage;
}(React.Component));
exports.CalendarPage = CalendarPage;
//# sourceMappingURL=CalendarPage.js.map