@lucca-front/ng 20.1.2 → 20.1.3-rc.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucca-front/ng",
3
- "version": "20.1.2",
3
+ "version": "20.1.3-rc.2",
4
4
  "description": "A library of icons made by the team @Lucca",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,8 +26,8 @@
26
26
  "@angular/common": "^20.0.0",
27
27
  "@angular/core": "^20.0.0",
28
28
  "@angular/cdk": "^20.0.0",
29
- "@lucca-front/icons": "20.1.2",
30
- "@lucca-front/scss": "20.1.2",
29
+ "@lucca-front/icons": "20.1.3-rc.2",
30
+ "@lucca-front/scss": "20.1.3-rc.2",
31
31
  "isomorphic-dompurify": "^2.17.0",
32
32
  "date-fns": "^3.6.0",
33
33
  "rxjs": "^7.8.0",
@@ -83,9 +83,9 @@
83
83
  "types": "./animations/index.d.ts",
84
84
  "default": "./fesm2022/lucca-front-ng-animations.mjs"
85
85
  },
86
- "./a11y": {
87
- "types": "./a11y/index.d.ts",
88
- "default": "./fesm2022/lucca-front-ng-a11y.mjs"
86
+ "./app-layout": {
87
+ "types": "./app-layout/index.d.ts",
88
+ "default": "./fesm2022/lucca-front-ng-app-layout.mjs"
89
89
  },
90
90
  "./api": {
91
91
  "types": "./api/index.d.ts",
@@ -95,9 +95,9 @@
95
95
  "types": "./box/index.d.ts",
96
96
  "default": "./fesm2022/lucca-front-ng-box.mjs"
97
97
  },
98
- "./app-layout": {
99
- "types": "./app-layout/index.d.ts",
100
- "default": "./fesm2022/lucca-front-ng-app-layout.mjs"
98
+ "./a11y": {
99
+ "types": "./a11y/index.d.ts",
100
+ "default": "./fesm2022/lucca-front-ng-a11y.mjs"
101
101
  },
102
102
  "./breadcrumbs": {
103
103
  "types": "./breadcrumbs/index.d.ts",
@@ -123,14 +123,14 @@
123
123
  "types": "./core/index.d.ts",
124
124
  "default": "./fesm2022/lucca-front-ng-core.mjs"
125
125
  },
126
- "./core-select": {
127
- "types": "./core-select/index.d.ts",
128
- "default": "./fesm2022/lucca-front-ng-core-select.mjs"
129
- },
130
126
  "./date": {
131
127
  "types": "./date/index.d.ts",
132
128
  "default": "./fesm2022/lucca-front-ng-date.mjs"
133
129
  },
130
+ "./core-select": {
131
+ "types": "./core-select/index.d.ts",
132
+ "default": "./fesm2022/lucca-front-ng-core-select.mjs"
133
+ },
134
134
  "./date2": {
135
135
  "types": "./date2/index.d.ts",
136
136
  "default": "./fesm2022/lucca-front-ng-date2.mjs"
@@ -121,6 +121,7 @@ function insertAngularImportIfNeeded(sourceFile, fileToEdit, symbolName) {
121
121
  return new change_1.NoopChange();
122
122
  }
123
123
  let insertPos = 0;
124
+ let needsComma = true;
124
125
  (0, typescript_1.forEachChild)(sourceFile, (0, angular_template_1.createVisitor)(typescript_1.isDecorator, (decorator) => {
125
126
  if (!(0, typescript_1.isCallExpression)(decorator.expression)) {
126
127
  return;
@@ -135,17 +136,24 @@ function insertAngularImportIfNeeded(sourceFile, fileToEdit, symbolName) {
135
136
  if (!argument || !(0, typescript_1.isObjectLiteralExpression)(argument)) {
136
137
  return;
137
138
  }
138
- const imports = argument.properties
139
+ const importsProperties = argument.properties
139
140
  .filter(typescript_1.isPropertyAssignment)
140
- .filter((prop) => (0, typescript_1.isIdentifier)(prop.name) && prop.name.text === 'imports')
141
+ .filter((prop) => (0, typescript_1.isIdentifier)(prop.name) && prop.name.text === 'imports');
142
+ const imports = importsProperties
141
143
  .map((prop) => prop.initializer)
142
- .find(typescript_1.isArrayLiteralExpression)?.elements;
143
- if (imports) {
144
- insertPos = imports[imports.length - 1].getEnd() || 0;
144
+ .find(typescript_1.isArrayLiteralExpression);
145
+ if (imports?.elements) {
146
+ if (imports.elements.length > 0) {
147
+ insertPos = imports.elements[imports.elements.length - 1].getEnd() || 0;
148
+ }
149
+ else {
150
+ insertPos = imports.elements.pos;
151
+ needsComma = false;
152
+ }
145
153
  }
146
154
  }));
147
155
  if (insertPos > 0) {
148
- return new change_1.InsertChange(fileToEdit, insertPos, `, ${symbolName}`);
156
+ return new change_1.InsertChange(fileToEdit, insertPos, needsComma ? `, ${symbolName}` : symbolName);
149
157
  }
150
158
  return new change_1.NoopChange();
151
159
  }
@@ -22,10 +22,10 @@ function migrateComponent(sourceFile, path, tree) {
22
22
  let thingsToAdd = ` luButton${button.type ? `="${button.type}"` : ""} `;
23
23
  // Converting inputs
24
24
  if (button.inputs.size) {
25
- thingsToAdd += `size="${button.inputs.size} `;
25
+ thingsToAdd += `size="${button.inputs.size}" `;
26
26
  }
27
27
  if (button.inputs.state) {
28
- thingsToAdd += `state="${button.inputs.state} `;
28
+ thingsToAdd += `state="${button.inputs.state}" `;
29
29
  }
30
30
  if (button.inputs.palette) {
31
31
  thingsToAdd += `palette="${button.inputs.palette}" `;