1 | (function (global, factory) {
|
2 | if (typeof define === "function" && define.amd) {
|
3 | define(["exports"], factory);
|
4 | } else if (typeof exports !== "undefined") {
|
5 | factory(exports);
|
6 | } else {
|
7 | var mod = {
|
8 | exports: {}
|
9 | };
|
10 | factory(mod.exports);
|
11 | global.featureFlags = mod.exports;
|
12 | }
|
13 | })(this, function (_exports) {
|
14 | ;
|
15 |
|
16 | Object.defineProperty(_exports, "__esModule", {
|
17 | value: true
|
18 | });
|
19 | _exports.gridColumns16 = _exports.grid = _exports.componentsX = _exports.breakingChangesX = _exports.default = void 0;
|
20 | /**
|
21 | * Copyright IBM Corp. 2016, 2018
|
22 | *
|
23 | * This source code is licensed under the Apache-2.0 license found in the
|
24 | * LICENSE file in the root directory of this source tree.
|
25 | */
|
26 |
|
27 | /**
|
28 | * This file contains the list of the default values of compile-time feature flags.
|
29 | *
|
30 | * Build toolchain can replace variable here and/or the references
|
31 | * in order to apply non-default values to those feature flags.
|
32 | *
|
33 | * @example Render `foo` if `aFeatureFlag` is `true`, render `bar` otherwise.
|
34 | * // `my-component.config.js`
|
35 | * const { aFeatureFlag } = require('/path/to/feature-flags');
|
36 | * ...
|
37 | * module.exports = {
|
38 | * variants: [
|
39 | * {
|
40 | * name: 'default',
|
41 | * label: 'My component',
|
42 | * context: {
|
43 | * aFeatureFlag,
|
44 | * ...
|
45 | * },
|
46 | * },
|
47 | * ...
|
48 | * ],
|
49 | * };
|
50 | *
|
51 | * // `my-component.hbs`
|
52 | * <div>
|
53 | * {{#if aFeatureFlag}}
|
54 | * foo
|
55 | * {{else}}
|
56 | * bar
|
57 | * {{/if}}
|
58 | * </div>
|
59 | *
|
60 | * @example Emit `foo` upon clicking on component's element if `aFeatureFlag` is `true`, emit `bar` otherwise.
|
61 | * import mixin from '/path/to/globals/js/misc/mixin';
|
62 | * import createComponent from '/path/to/globals/js/mixins/create-component';
|
63 | * import initComponentBySearch from '/path/to/globals/js/mixins/init-component-by-search';
|
64 | * import handles from '/path/to/globals/js/mixins/handles';
|
65 | * import on from '/path/to/globals/js/misc/on';
|
66 | *
|
67 | * import { aFeatureFlag } from '/path/to/globals/js/feature-flags';
|
68 | *
|
69 | * class MyClass extends mixin(createComponent, initComponentBySearch, handles) {
|
70 | * constructor(element, options) {
|
71 | * super(element, options);
|
72 | * this.manage(
|
73 | * on(this.element, 'click', () => {
|
74 | * console.log(aFeatureFlag ? 'foo' : 'bar');
|
75 | * })
|
76 | * );
|
77 | * }
|
78 | * }
|
79 | */
|
80 |
|
81 | var breakingChangesX = false;
|
82 | _exports.breakingChangesX = breakingChangesX;
|
83 | var componentsX = false;
|
84 | _exports.componentsX = componentsX;
|
85 | var grid = false;
|
86 | _exports.grid = grid;
|
87 | var gridColumns16 = false;
|
88 | _exports.gridColumns16 = gridColumns16;
|
89 | var featureFlags = {
|
90 | breakingChangesX: breakingChangesX,
|
91 | componentsX: componentsX,
|
92 | grid: grid,
|
93 | gridColumns16: gridColumns16
|
94 | };
|
95 | var _default = featureFlags;
|
96 | _exports.default = _default;
|
97 | }); |
\ | No newline at end of file |