@komaci/esm-generator 240.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/__tests__/compile-generated-module-fixtures.spec.d.ts +2 -0
- package/build/__tests__/compile-generated-module-fixtures.spec.js +45 -0
- package/build/__tests__/fixtures-combined-files/exclude-comps-unused-import-prop/actual.d.ts +5 -0
- package/build/__tests__/fixtures-combined-files/exclude-comps-unused-import-prop/actual.js +28 -0
- package/build/__tests__/fixtures-combined-files/exclude-partial-classProps-indirect-importRef-getter/actual.d.ts +28 -0
- package/build/__tests__/fixtures-combined-files/exclude-partial-classProps-indirect-importRef-getter/actual.js +144 -0
- package/build/__tests__/fixtures-combined-files/exclude-total-unused-import-getter-from-one/actual.d.ts +8 -0
- package/build/__tests__/fixtures-combined-files/exclude-total-unused-import-getter-from-one/actual.js +35 -0
- package/build/__tests__/fixtures-combined-files/exclude-total-unused-import-getter-from-two/actual.d.ts +9 -0
- package/build/__tests__/fixtures-combined-files/exclude-total-unused-import-getter-from-two/actual.js +39 -0
- package/build/__tests__/fixtures-combined-files/exclude-wire-unused-import-prop/actual.d.ts +6 -0
- package/build/__tests__/fixtures-combined-files/exclude-wire-unused-import-prop/actual.js +34 -0
- package/build/__tests__/fixtures-combined-files/image-type/actual.d.ts +12 -0
- package/build/__tests__/fixtures-combined-files/image-type/actual.js +41 -0
- package/build/__tests__/fixtures-combined-files/include-all-indirect-importRef-getter-complex/actual.d.ts +13 -0
- package/build/__tests__/fixtures-combined-files/include-all-indirect-importRef-getter-complex/actual.js +75 -0
- package/build/__tests__/fixtures-combined-files/include-class-prop-indirect-importRef-getter/actual.d.ts +17 -0
- package/build/__tests__/fixtures-combined-files/include-class-prop-indirect-importRef-getter/actual.js +99 -0
- package/build/__tests__/fixtures-combined-files/include-comps-used-import-prop/actual.d.ts +5 -0
- package/build/__tests__/fixtures-combined-files/include-comps-used-import-prop/actual.js +28 -0
- package/build/__tests__/fixtures-combined-files/include-template-strings/actual.d.ts +9 -0
- package/build/__tests__/fixtures-combined-files/include-template-strings/actual.js +41 -0
- package/build/__tests__/fixtures-combined-files/include-used-import-getter/actual.d.ts +8 -0
- package/build/__tests__/fixtures-combined-files/include-used-import-getter/actual.js +38 -0
- package/build/__tests__/fixtures-combined-files/include-wire-used-import-prop/actual.d.ts +6 -0
- package/build/__tests__/fixtures-combined-files/include-wire-used-import-prop/actual.js +34 -0
- package/build/__tests__/fixtures-combined-files/unsupported-wire-from-supported-namespace/actual.d.ts +5 -0
- package/build/__tests__/fixtures-combined-files/unsupported-wire-from-supported-namespace/actual.js +19 -0
- package/build/__tests__/fixtures-script-files/class-extends-multiple-with-separate-imports/actual.d.ts +8 -0
- package/build/__tests__/fixtures-script-files/class-extends-multiple-with-separate-imports/actual.js +17 -0
- package/build/__tests__/fixtures-script-files/class-extends-separate-imports/actual.d.ts +4 -0
- package/build/__tests__/fixtures-script-files/class-extends-separate-imports/actual.js +13 -0
- package/build/__tests__/fixtures-script-files/class-extends-separate-imports-alias/actual.d.ts +4 -0
- package/build/__tests__/fixtures-script-files/class-extends-separate-imports-alias/actual.js +10 -0
- package/build/__tests__/fixtures-script-files/class-props/actual.d.ts +25 -0
- package/build/__tests__/fixtures-script-files/class-props/actual.js +92 -0
- package/build/__tests__/fixtures-script-files/empty-class/actual.d.ts +3 -0
- package/build/__tests__/fixtures-script-files/empty-class/actual.js +7 -0
- package/build/__tests__/fixtures-script-files/empty-doc/actual.d.ts +1 -0
- package/build/__tests__/fixtures-script-files/empty-doc/actual.js +2 -0
- package/build/__tests__/fixtures-script-files/empty-wire/actual.d.ts +4 -0
- package/build/__tests__/fixtures-script-files/empty-wire/actual.js +16 -0
- package/build/__tests__/fixtures-script-files/exclude-wire-unused-import-prop/actual.d.ts +6 -0
- package/build/__tests__/fixtures-script-files/exclude-wire-unused-import-prop/actual.js +34 -0
- package/build/__tests__/fixtures-script-files/exports/actual.d.ts +21 -0
- package/build/__tests__/fixtures-script-files/exports/actual.js +63 -0
- package/build/__tests__/fixtures-script-files/imports/actual.d.ts +10 -0
- package/build/__tests__/fixtures-script-files/imports/actual.js +76 -0
- package/build/__tests__/fixtures-script-files/imports-namespaced/actual.d.ts +9 -0
- package/build/__tests__/fixtures-script-files/imports-namespaced/actual.js +59 -0
- package/build/__tests__/fixtures-script-files/include-wire-unused-import-prop/actual.d.ts +6 -0
- package/build/__tests__/fixtures-script-files/include-wire-unused-import-prop/actual.js +34 -0
- package/build/__tests__/fixtures-script-files/inheritance-imports-default/actual.d.ts +3 -0
- package/build/__tests__/fixtures-script-files/inheritance-imports-default/actual.js +10 -0
- package/build/__tests__/fixtures-script-files/inheritance-imports-local/actual.d.ts +8 -0
- package/build/__tests__/fixtures-script-files/inheritance-imports-local/actual.js +24 -0
- package/build/__tests__/fixtures-script-files/inheritance-imports-named/actual.d.ts +4 -0
- package/build/__tests__/fixtures-script-files/inheritance-imports-named/actual.js +17 -0
- package/build/__tests__/fixtures-script-files/inheritance-parent-unresolved/actual.d.ts +4 -0
- package/build/__tests__/fixtures-script-files/inheritance-parent-unresolved/actual.js +17 -0
- package/build/__tests__/fixtures-script-files/unsupported-wire-from-supported-namespace/actual.d.ts +5 -0
- package/build/__tests__/fixtures-script-files/unsupported-wire-from-supported-namespace/actual.js +19 -0
- package/build/__tests__/fixtures-script-files/wire-basic/actual.d.ts +7 -0
- package/build/__tests__/fixtures-script-files/wire-basic/actual.js +30 -0
- package/build/__tests__/fixtures-script-files/wire-functions/actual.d.ts +12 -0
- package/build/__tests__/fixtures-script-files/wire-functions/actual.js +46 -0
- package/build/__tests__/fixtures-script-files/wire-imports/actual.d.ts +10 -0
- package/build/__tests__/fixtures-script-files/wire-imports/actual.js +59 -0
- package/build/__tests__/fixtures-source-code/badImportRef.d.ts +4 -0
- package/build/__tests__/fixtures-source-code/badImportRef.js +21 -0
- package/build/__tests__/fixtures-source-code/generalMockSourceCode.d.ts +5 -0
- package/build/__tests__/fixtures-source-code/generalMockSourceCode.js +93 -0
- package/build/__tests__/general-komaci-docs/assorted-template-strings/source.d.ts +9 -0
- package/build/__tests__/general-komaci-docs/assorted-template-strings/source.js +41 -0
- package/build/__tests__/general-komaci-docs/getters-and-compositions-collisions/source.d.ts +6 -0
- package/build/__tests__/general-komaci-docs/getters-and-compositions-collisions/source.js +31 -0
- package/build/__tests__/general-komaci-docs/import-types/source.d.ts +18 -0
- package/build/__tests__/general-komaci-docs/import-types/source.js +104 -0
- package/build/__tests__/general-komaci-docs/import-types/validationStuff.d.ts +18 -0
- package/build/__tests__/general-komaci-docs/import-types/validationStuff.js +63 -0
- package/build/__tests__/general-komaci-docs/template-component/source.d.ts +8 -0
- package/build/__tests__/general-komaci-docs/template-component/source.js +34 -0
- package/build/__tests__/index.spec.d.ts +2 -0
- package/build/__tests__/index.spec.js +124 -0
- package/build/__tests__/komaci-ast-unit.spec.d.ts +2 -0
- package/build/__tests__/komaci-ast-unit.spec.js +628 -0
- package/build/__tests__/komaci-bundle-module.fixtures.spec.d.ts +2 -0
- package/build/__tests__/komaci-bundle-module.fixtures.spec.js +75 -0
- package/build/__tests__/komaci-script-module.fixtures.spec.d.ts +2 -0
- package/build/__tests__/komaci-script-module.fixtures.spec.js +66 -0
- package/build/__tests__/komaci-template-module.fixtures.spec.d.ts +2 -0
- package/build/__tests__/komaci-template-module.fixtures.spec.js +56 -0
- package/build/__tests__/modGenScript.spec.d.ts +2 -0
- package/build/__tests__/modGenScript.spec.js +110 -0
- package/build/__tests__/modGenTemplate.spec.d.ts +2 -0
- package/build/__tests__/modGenTemplate.spec.js +196 -0
- package/build/__tests__/shared.spec.d.ts +2 -0
- package/build/__tests__/shared.spec.js +62 -0
- package/build/__tests__/templateStrings.spec.d.ts +2 -0
- package/build/__tests__/templateStrings.spec.js +130 -0
- package/build/index.d.ts +4 -0
- package/build/index.js +130 -0
- package/build/modGenScript.d.ts +38 -0
- package/build/modGenScript.js +1027 -0
- package/build/modGenTemplate.d.ts +37 -0
- package/build/modGenTemplate.js +402 -0
- package/build/shared.d.ts +170 -0
- package/build/shared.js +588 -0
- package/build/types.d.ts +132 -0
- package/build/types.js +14 -0
- package/package.json +40 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const fs_1 = __importDefault(require("fs"));
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const glob_1 = __importDefault(require("glob"));
|
|
9
|
+
const sfdc_lwc_compiler_1 = require("@lwc-platform/sfdc-lwc-compiler");
|
|
10
|
+
const EXPECTED_SRC_FILENAME = 'expected.src';
|
|
11
|
+
describe('fixtures', () => {
|
|
12
|
+
const fixtures = glob_1.default.sync(path_1.default.resolve(__dirname, '**/expected.src'));
|
|
13
|
+
for (const caseEntry of fixtures) {
|
|
14
|
+
const caseFolder = path_1.default.dirname(caseEntry);
|
|
15
|
+
const caseName = path_1.default.relative(__dirname, caseFolder);
|
|
16
|
+
const fixtureFilePath = (fileName) => {
|
|
17
|
+
return path_1.default.join(caseFolder, fileName);
|
|
18
|
+
};
|
|
19
|
+
const readFixtureFile = (fileName) => {
|
|
20
|
+
const filePath = fixtureFilePath(fileName);
|
|
21
|
+
return fs_1.default.existsSync(filePath) ? fs_1.default.readFileSync(filePath, 'utf-8') : null;
|
|
22
|
+
};
|
|
23
|
+
it(`${caseName}-komaci-module`, async () => {
|
|
24
|
+
const fileStr = readFixtureFile(EXPECTED_SRC_FILENAME);
|
|
25
|
+
expect(fileStr).not.toBeNull();
|
|
26
|
+
const files = { 'test.js': fileStr !== null ? fileStr : '' };
|
|
27
|
+
const result = await (0, sfdc_lwc_compiler_1.compile)({
|
|
28
|
+
bundle: {
|
|
29
|
+
name: 'test',
|
|
30
|
+
namespace: 'c',
|
|
31
|
+
type: 'internal',
|
|
32
|
+
files,
|
|
33
|
+
options: {
|
|
34
|
+
enableMetadataNext: true,
|
|
35
|
+
komaciOptions: {
|
|
36
|
+
enableKomaci: false,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
expect(result.success).toBe(true);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=compile-generated-module-fixtures.spec.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const lwc_1 = require("lwc");
|
|
13
|
+
const myLabel_1 = __importDefault(require("@salesforce/label/myLabel"));
|
|
14
|
+
class ScriptTestClass extends lwc_1.LightningElement {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
this.label = myLabel_1.default;
|
|
18
|
+
this.myAttr = 'Hello, World!';
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
__decorate([
|
|
22
|
+
lwc_1.api
|
|
23
|
+
], ScriptTestClass.prototype, "label", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
lwc_1.api
|
|
26
|
+
], ScriptTestClass.prototype, "myAttr", void 0);
|
|
27
|
+
exports.default = ScriptTestClass;
|
|
28
|
+
//# sourceMappingURL=actual.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export default class ScriptTestClass {
|
|
2
|
+
recordId: any;
|
|
3
|
+
label: any;
|
|
4
|
+
label2: any;
|
|
5
|
+
defLbl: any;
|
|
6
|
+
nspLbl: any;
|
|
7
|
+
defMixedLbl: any;
|
|
8
|
+
nonDefMixedLbl: any;
|
|
9
|
+
defMixedLbl2: any;
|
|
10
|
+
nonDefMixedLbl2: any;
|
|
11
|
+
defMixedLbl31: any;
|
|
12
|
+
nonDefMixedLbl32: any;
|
|
13
|
+
nonDefMixedLbl33: any;
|
|
14
|
+
nonDefMixedLbl41: any;
|
|
15
|
+
nonDefMixedLbl42: any;
|
|
16
|
+
nonDefMixedLbl43: any;
|
|
17
|
+
nonDefMixedLbl44: any;
|
|
18
|
+
myAttr: string;
|
|
19
|
+
get myGetter(): string;
|
|
20
|
+
get myGetter2(): string;
|
|
21
|
+
get myGetter3(): string;
|
|
22
|
+
get myGetter4(): string;
|
|
23
|
+
get myGetter5(): string;
|
|
24
|
+
record: any;
|
|
25
|
+
record2: any;
|
|
26
|
+
record3: any;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=actual.d.ts.map
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
+
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;
|
|
18
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
+
};
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
28
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
29
|
+
};
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
const lwc_1 = require("lwc");
|
|
32
|
+
const uiRecordApi_1 = require("lightning/uiRecordApi");
|
|
33
|
+
const shared_1 = require("force/shared");
|
|
34
|
+
const shared_2 = require("force/shared");
|
|
35
|
+
const transformWire_1 = __importDefault(require("laf/transformWire"));
|
|
36
|
+
const nspLabel = __importStar(require("formula/formulaEngine"));
|
|
37
|
+
const graphql_1 = __importStar(require("lightning/graphql"));
|
|
38
|
+
const batchingPortable_1 = __importStar(require("laf/batchingPortable"));
|
|
39
|
+
const shared_3 = __importStar(require("force/shared"));
|
|
40
|
+
class ScriptTestClass extends lwc_1.LightningElement {
|
|
41
|
+
constructor() {
|
|
42
|
+
super(...arguments);
|
|
43
|
+
this.label = shared_1.LABEL;
|
|
44
|
+
this.label2 = shared_2.LABEL2;
|
|
45
|
+
this.defLbl = transformWire_1.default;
|
|
46
|
+
this.nspLbl = nspLabel;
|
|
47
|
+
this.defMixedLbl = graphql_1.default;
|
|
48
|
+
this.nonDefMixedLbl = graphql_1.nonDefMixedLabel;
|
|
49
|
+
this.defMixedLbl2 = batchingPortable_1.default;
|
|
50
|
+
this.nonDefMixedLbl2 = batchingPortable_1.nonDefMixedLabel2;
|
|
51
|
+
this.defMixedLbl31 = shared_3.default;
|
|
52
|
+
this.nonDefMixedLbl32 = shared_3.nonDefMixedLabel32;
|
|
53
|
+
this.nonDefMixedLbl33 = shared_3.nonDefMixedLabel33;
|
|
54
|
+
this.nonDefMixedLbl41 = shared_3.nonDefMixedLabel41;
|
|
55
|
+
this.nonDefMixedLbl42 = shared_3.nonDefMixedLabel42;
|
|
56
|
+
this.nonDefMixedLbl43 = shared_3.nonDefMixedLabel43;
|
|
57
|
+
this.nonDefMixedLbl44 = shared_3.nonDefMixedLabel44;
|
|
58
|
+
this.myAttr = 'Hello, World!';
|
|
59
|
+
}
|
|
60
|
+
get myGetter() {
|
|
61
|
+
return 'something ' + this.myAttr;
|
|
62
|
+
}
|
|
63
|
+
get myGetter2() {
|
|
64
|
+
return 'something ' + this.label2 + this.myAttr;
|
|
65
|
+
}
|
|
66
|
+
get myGetter3() {
|
|
67
|
+
return 'something ' + this.label2 + this.nspLbl + this.defMixedLbl + this.myAttr;
|
|
68
|
+
}
|
|
69
|
+
get myGetter4() {
|
|
70
|
+
return 'something ' + this.nonDefMixedLbl2 + this.nonDefMixedLbl32 + this.myAttr;
|
|
71
|
+
}
|
|
72
|
+
get myGetter5() {
|
|
73
|
+
return ('something else ' +
|
|
74
|
+
this.nonDefMixedLbl41 +
|
|
75
|
+
this.nonDefMixedLbl43 +
|
|
76
|
+
this.myAttr);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
__decorate([
|
|
80
|
+
lwc_1.api
|
|
81
|
+
], ScriptTestClass.prototype, "recordId", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
lwc_1.api
|
|
84
|
+
], ScriptTestClass.prototype, "label", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
lwc_1.api
|
|
87
|
+
], ScriptTestClass.prototype, "label2", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
lwc_1.api
|
|
90
|
+
], ScriptTestClass.prototype, "defLbl", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
lwc_1.api
|
|
93
|
+
], ScriptTestClass.prototype, "nspLbl", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
lwc_1.api
|
|
96
|
+
], ScriptTestClass.prototype, "defMixedLbl", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
lwc_1.api
|
|
99
|
+
], ScriptTestClass.prototype, "nonDefMixedLbl", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
lwc_1.api
|
|
102
|
+
], ScriptTestClass.prototype, "defMixedLbl2", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
lwc_1.api
|
|
105
|
+
], ScriptTestClass.prototype, "nonDefMixedLbl2", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
lwc_1.api
|
|
108
|
+
], ScriptTestClass.prototype, "defMixedLbl31", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
lwc_1.api
|
|
111
|
+
], ScriptTestClass.prototype, "nonDefMixedLbl32", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
lwc_1.api
|
|
114
|
+
], ScriptTestClass.prototype, "nonDefMixedLbl33", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
lwc_1.api
|
|
117
|
+
], ScriptTestClass.prototype, "nonDefMixedLbl41", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
lwc_1.api
|
|
120
|
+
], ScriptTestClass.prototype, "nonDefMixedLbl42", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
lwc_1.api
|
|
123
|
+
], ScriptTestClass.prototype, "nonDefMixedLbl43", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
lwc_1.api
|
|
126
|
+
], ScriptTestClass.prototype, "nonDefMixedLbl44", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
lwc_1.api
|
|
129
|
+
], ScriptTestClass.prototype, "myAttr", void 0);
|
|
130
|
+
__decorate([
|
|
131
|
+
(0, lwc_1.wire)(uiRecordApi_1.getRecord, { recordId: '$myGetter', layoutTypes: ['Full'], modes: ['View'] })
|
|
132
|
+
], ScriptTestClass.prototype, "record", void 0);
|
|
133
|
+
__decorate([
|
|
134
|
+
(0, lwc_1.wire)(uiRecordApi_1.getRecordUi, {
|
|
135
|
+
recordIds: '$myGetter2',
|
|
136
|
+
layoutTypes: ['Full'],
|
|
137
|
+
modes: ['View'],
|
|
138
|
+
})
|
|
139
|
+
], ScriptTestClass.prototype, "record2", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
(0, lwc_1.wire)(uiRecordApi_1.getRecordCreateDefaults, { objectApiName: '$myGetter3' })
|
|
142
|
+
], ScriptTestClass.prototype, "record3", void 0);
|
|
143
|
+
exports.default = ScriptTestClass;
|
|
144
|
+
//# sourceMappingURL=actual.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
const lwc_1 = require("lwc");
|
|
10
|
+
const uiRecordApi_1 = require("lightning/uiRecordApi");
|
|
11
|
+
const shared_1 = require("force/shared");
|
|
12
|
+
class Example extends lwc_1.LightningElement {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.label = shared_1.LABEL;
|
|
16
|
+
this.myAttr = 'Hello, World!';
|
|
17
|
+
}
|
|
18
|
+
get myGetter() {
|
|
19
|
+
return 'something ' + this.myAttr;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
__decorate([
|
|
23
|
+
lwc_1.api
|
|
24
|
+
], Example.prototype, "recordId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
lwc_1.api
|
|
27
|
+
], Example.prototype, "label", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
lwc_1.api
|
|
30
|
+
], Example.prototype, "myAttr", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, lwc_1.wire)(uiRecordApi_1.getRecord, { recordId: '$myGetter', layoutTypes: ['Full'], modes: ['View'] })
|
|
33
|
+
], Example.prototype, "record", void 0);
|
|
34
|
+
exports.default = Example;
|
|
35
|
+
//# sourceMappingURL=actual.js.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
const lwc_1 = require("lwc");
|
|
10
|
+
const uiRecordApi_1 = require("lightning/uiRecordApi");
|
|
11
|
+
const shared_1 = require("force/shared");
|
|
12
|
+
class Example extends lwc_1.LightningElement {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.label = shared_1.LABEL;
|
|
16
|
+
this.label2 = shared_1.LABEL2;
|
|
17
|
+
this.myAttr = 'Hello, World!';
|
|
18
|
+
}
|
|
19
|
+
get myGetter() {
|
|
20
|
+
return 'something ' + this.myAttr;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
__decorate([
|
|
24
|
+
lwc_1.api
|
|
25
|
+
], Example.prototype, "recordId", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
lwc_1.api
|
|
28
|
+
], Example.prototype, "label", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
lwc_1.api
|
|
31
|
+
], Example.prototype, "label2", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
lwc_1.api
|
|
34
|
+
], Example.prototype, "myAttr", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, lwc_1.wire)(uiRecordApi_1.getRecord, { recordId: '$myGetter', layoutTypes: ['Full'], modes: ['View'] })
|
|
37
|
+
], Example.prototype, "record", void 0);
|
|
38
|
+
exports.default = Example;
|
|
39
|
+
//# sourceMappingURL=actual.js.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const lwc_1 = require("lwc");
|
|
13
|
+
const uiRecordApi_1 = require("lightning/uiRecordApi");
|
|
14
|
+
const myLabel_1 = __importDefault(require("@salesforce/label/myLabel"));
|
|
15
|
+
class ScriptTestClass extends lwc_1.LightningElement {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.label = myLabel_1.default;
|
|
19
|
+
this.myAttr = 'hello, world';
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
__decorate([
|
|
23
|
+
lwc_1.api
|
|
24
|
+
], ScriptTestClass.prototype, "label", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
lwc_1.api
|
|
27
|
+
], ScriptTestClass.prototype, "myAttr", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, lwc_1.wire)(uiRecordApi_1.getRecord, {
|
|
30
|
+
resourceId: '$myAttr',
|
|
31
|
+
})
|
|
32
|
+
], ScriptTestClass.prototype, "myWire", void 0);
|
|
33
|
+
exports.default = ScriptTestClass;
|
|
34
|
+
//# sourceMappingURL=actual.js.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
const lwc_1 = require("lwc");
|
|
10
|
+
const uiRecordApi_1 = require("lightning/uiRecordApi");
|
|
11
|
+
class WireFunction extends lwc_1.LightningElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.imageObject = {
|
|
15
|
+
nested: {
|
|
16
|
+
imageName: 'myImage.jpg',
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
__decorate([
|
|
22
|
+
lwc_1.api
|
|
23
|
+
], WireFunction.prototype, "recordId", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
lwc_1.track
|
|
26
|
+
], WireFunction.prototype, "record", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
lwc_1.api
|
|
29
|
+
], WireFunction.prototype, "testField", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
lwc_1.api
|
|
32
|
+
], WireFunction.prototype, "imageObject", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, lwc_1.wire)(uiRecordApi_1.getRecord, {
|
|
35
|
+
resourceId: '$recordId',
|
|
36
|
+
fields: ['Name'],
|
|
37
|
+
recordType: '$recordType',
|
|
38
|
+
})
|
|
39
|
+
], WireFunction.prototype, "wiredName", void 0);
|
|
40
|
+
exports.default = WireFunction;
|
|
41
|
+
//# sourceMappingURL=actual.js.map
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
+
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;
|
|
18
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
+
};
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
const lwc_1 = require("lwc");
|
|
29
|
+
const uiRecordApi_1 = require("lightning/uiRecordApi");
|
|
30
|
+
const shared_1 = require("force/shared");
|
|
31
|
+
const shared_2 = __importStar(require("force/shared"));
|
|
32
|
+
const lbl5 = __importStar(require("laf/transformWire"));
|
|
33
|
+
class Example extends lwc_1.LightningElement {
|
|
34
|
+
constructor() {
|
|
35
|
+
super(...arguments);
|
|
36
|
+
this.label = shared_1.LABEL;
|
|
37
|
+
this.label2 = shared_1.LABEL2;
|
|
38
|
+
this.label3 = shared_2.default;
|
|
39
|
+
this.label4 = shared_2.LABEL4;
|
|
40
|
+
this.label5 = lbl5;
|
|
41
|
+
this.myAttr = 'Hello, World!';
|
|
42
|
+
}
|
|
43
|
+
get myGetter() {
|
|
44
|
+
return 'something ' + shared_1.LABEL + this.myAttr;
|
|
45
|
+
}
|
|
46
|
+
get myGetter2() {
|
|
47
|
+
return 'something ' + shared_1.LABEL2 + shared_2.default + shared_2.LABEL4 + lbl5 + shared_2.trouble + this.myAttr;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
__decorate([
|
|
51
|
+
lwc_1.api
|
|
52
|
+
], Example.prototype, "recordId", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
lwc_1.api
|
|
55
|
+
], Example.prototype, "label", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
lwc_1.api
|
|
58
|
+
], Example.prototype, "label2", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
lwc_1.api
|
|
61
|
+
], Example.prototype, "label3", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
lwc_1.api
|
|
64
|
+
], Example.prototype, "label4", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
lwc_1.api
|
|
67
|
+
], Example.prototype, "label5", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
lwc_1.api
|
|
70
|
+
], Example.prototype, "myAttr", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, lwc_1.wire)(uiRecordApi_1.getRecord, { recordId: '$myGetter', layoutTypes: ['Full'], modes: ['View'] })
|
|
73
|
+
], Example.prototype, "record", void 0);
|
|
74
|
+
exports.default = Example;
|
|
75
|
+
//# sourceMappingURL=actual.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default class ScriptTestClass {
|
|
2
|
+
recordId: any;
|
|
3
|
+
label: any;
|
|
4
|
+
label2: any;
|
|
5
|
+
defLbl: any;
|
|
6
|
+
nspLbl: any;
|
|
7
|
+
defMixedLbl: any;
|
|
8
|
+
nonDefMixedLbl: any;
|
|
9
|
+
myAttr: string;
|
|
10
|
+
get myGetter(): string;
|
|
11
|
+
get myGetter2(): string;
|
|
12
|
+
get myGetter3(): string;
|
|
13
|
+
record: any;
|
|
14
|
+
record2: any;
|
|
15
|
+
record3: any;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=actual.d.ts.map
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
+
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;
|
|
18
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
+
};
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
28
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
29
|
+
};
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
const lwc_1 = require("lwc");
|
|
32
|
+
const uiRecordApi_1 = require("lightning/uiRecordApi");
|
|
33
|
+
const shared_1 = require("force/shared");
|
|
34
|
+
const transformWire_1 = require("laf/transformWire");
|
|
35
|
+
const formulaEngine_1 = __importDefault(require("formula/formulaEngine"));
|
|
36
|
+
const nspLabel = __importStar(require("lightning/graphql"));
|
|
37
|
+
const batchingPortable_1 = __importStar(require("laf/batchingPortable"));
|
|
38
|
+
class ScriptTestClass extends lwc_1.LightningElement {
|
|
39
|
+
constructor() {
|
|
40
|
+
super(...arguments);
|
|
41
|
+
this.label = shared_1.LABEL;
|
|
42
|
+
this.label2 = transformWire_1.LABEL2;
|
|
43
|
+
this.defLbl = formulaEngine_1.default;
|
|
44
|
+
this.nspLbl = nspLabel;
|
|
45
|
+
this.defMixedLbl = batchingPortable_1.default;
|
|
46
|
+
this.nonDefMixedLbl = batchingPortable_1.nonDefMixedLabel;
|
|
47
|
+
this.myAttr = 'Hello, World!';
|
|
48
|
+
}
|
|
49
|
+
get myGetter() {
|
|
50
|
+
return 'something ' + this.label + this.myAttr;
|
|
51
|
+
}
|
|
52
|
+
get myGetter2() {
|
|
53
|
+
return 'something ' + this.label2 + this.myAttr;
|
|
54
|
+
}
|
|
55
|
+
get myGetter3() {
|
|
56
|
+
return ('something ' +
|
|
57
|
+
this.label2 +
|
|
58
|
+
this.defLbl +
|
|
59
|
+
this.nspLbl +
|
|
60
|
+
this.defMixedLbl +
|
|
61
|
+
this.nonDefMixedLbl +
|
|
62
|
+
this.myAttr);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
__decorate([
|
|
66
|
+
lwc_1.api
|
|
67
|
+
], ScriptTestClass.prototype, "recordId", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
lwc_1.api
|
|
70
|
+
], ScriptTestClass.prototype, "label", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
lwc_1.api
|
|
73
|
+
], ScriptTestClass.prototype, "label2", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
lwc_1.api
|
|
76
|
+
], ScriptTestClass.prototype, "defLbl", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
lwc_1.api
|
|
79
|
+
], ScriptTestClass.prototype, "nspLbl", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
lwc_1.api
|
|
82
|
+
], ScriptTestClass.prototype, "defMixedLbl", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
lwc_1.api
|
|
85
|
+
], ScriptTestClass.prototype, "nonDefMixedLbl", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
lwc_1.api
|
|
88
|
+
], ScriptTestClass.prototype, "myAttr", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, lwc_1.wire)(uiRecordApi_1.getRecord, { recordId: '$myGetter', layoutTypes: ['Full'], modes: ['View'] })
|
|
91
|
+
], ScriptTestClass.prototype, "record", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, lwc_1.wire)(uiRecordApi_1.getRecordUi, { recordId: '$myGetter2', layoutTypes: ['Full'], modes: ['View'] })
|
|
94
|
+
], ScriptTestClass.prototype, "record2", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, lwc_1.wire)(uiRecordApi_1.getRecordCreateDefaults, { objectApiName: '$myGetter3' })
|
|
97
|
+
], ScriptTestClass.prototype, "record3", void 0);
|
|
98
|
+
exports.default = ScriptTestClass;
|
|
99
|
+
//# sourceMappingURL=actual.js.map
|