Page.js 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = exports.Page = void 0;
  6. /*eslint no-unused-vars: "off"*/
  7. /**
  8. * @interface Page
  9. * Page
  10. * Page content that is returned by PageRouter.
  11. */
  12. class Page {
  13. /**
  14. * @description Creates a page.
  15. * @param {Object} params The page parameters.
  16. * @param {String} params.id The page identifier.
  17. * @param {String} params.defaultFile The page file name.
  18. * @returns {Page} The page.
  19. */
  20. constructor(params = {}) {
  21. const {
  22. id,
  23. defaultFile
  24. } = params;
  25. this._id = id;
  26. this._defaultFile = defaultFile;
  27. }
  28. get id() {
  29. return this._id;
  30. }
  31. get defaultFile() {
  32. return this._defaultFile;
  33. }
  34. set id(v) {
  35. this._id = v;
  36. }
  37. set defaultFile(v) {
  38. this._defaultFile = v;
  39. }
  40. }
  41. exports.Page = Page;
  42. var _default = exports.default = Page;
  43. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJQYWdlIiwiY29uc3RydWN0b3IiLCJwYXJhbXMiLCJpZCIsImRlZmF1bHRGaWxlIiwiX2lkIiwiX2RlZmF1bHRGaWxlIiwidiIsImV4cG9ydHMiLCJfZGVmYXVsdCIsImRlZmF1bHQiXSwic291cmNlcyI6WyIuLi9zcmMvUGFnZS5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKmVzbGludCBuby11bnVzZWQtdmFyczogXCJvZmZcIiovXG4vKipcbiAqIEBpbnRlcmZhY2UgUGFnZVxuICogUGFnZVxuICogUGFnZSBjb250ZW50IHRoYXQgaXMgcmV0dXJuZWQgYnkgUGFnZVJvdXRlci5cbiAqL1xuZXhwb3J0IGNsYXNzIFBhZ2Uge1xuICAvKipcbiAgICogQGRlc2NyaXB0aW9uIENyZWF0ZXMgYSBwYWdlLlxuICAgKiBAcGFyYW0ge09iamVjdH0gcGFyYW1zIFRoZS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